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.



137
138
139
140
141
# File 'lib/crokus/ast.rb', line 137

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.



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

def args
  @args
end

#bodyObject

Returns the value of attribute body.



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

def body
  @body
end

#cfgObject

Returns the value of attribute cfg.



136
137
138
# File 'lib/crokus/ast.rb', line 136

def cfg
  @cfg
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end