Method: Crokus::Parser#function_decl
- Defined in:
- lib/crokus/parser.rb
#function_decl(name, type_) ⇒ Object
202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/crokus/parser.rb', line 202 def function_decl name,type_ indent "function" args=function_formal_args() case showNext.kind when :semicolon acceptIt ret =FunctionProto.new(name,type_,args) else body=function_body() ret= Function.new(name,type_,args,body) end dedent return ret end |