Class: Crokus::Function

Inherits:
Ast
  • Object
show all
Defined in:
lib/crokus/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ast

#accept, #str

Constructor Details

#initialize(name, ret_type, args = [], body = nil) ⇒ Function

Returns a new instance of Function.



133
134
135
136
137
# File 'lib/crokus/ast.rb', line 133

def initialize name,ret_type,args=[],body=nil
  @name,@type=name,ret_type
  @args=args
  @body=body if body
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



131
132
133
# File 'lib/crokus/ast.rb', line 131

def args
  @args
end

#bodyObject

Returns the value of attribute body.



131
132
133
# File 'lib/crokus/ast.rb', line 131

def body
  @body
end

#cfgObject

Returns the value of attribute cfg.



132
133
134
# File 'lib/crokus/ast.rb', line 132

def cfg
  @cfg
end

#nameObject

Returns the value of attribute name.



131
132
133
# File 'lib/crokus/ast.rb', line 131

def name
  @name
end

#typeObject

Returns the value of attribute type.



131
132
133
# File 'lib/crokus/ast.rb', line 131

def type
  @type
end