Class: Crokus::Decl

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

Overview

.….….…..end of types.….….….….

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ast

#accept, #str

Constructor Details

#initialize(type, var, init = nil) ⇒ Decl

Returns a new instance of Decl.



122
123
124
# File 'lib/crokus/ast.rb', line 122

def initialize type,var,init=nil
  @var,@type,@init=var,type,init
end

Instance Attribute Details

#initObject

Returns the value of attribute init.



121
122
123
# File 'lib/crokus/ast.rb', line 121

def init
  @init
end

#typeObject

Returns the value of attribute type.



121
122
123
# File 'lib/crokus/ast.rb', line 121

def type
  @type
end

#varObject

Returns the value of attribute var.



121
122
123
# File 'lib/crokus/ast.rb', line 121

def var
  @var
end