Class: Dhallish::Ast::Literal_Node

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(val, type) ⇒ Literal_Node

Returns a new instance of Literal_Node.



810
811
812
813
# File 'lib/ast.rb', line 810

def initialize(val, type)
	@val = val
	@type = type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



808
809
810
# File 'lib/ast.rb', line 808

def type
  @type
end

#valObject

Returns the value of attribute val.



807
808
809
# File 'lib/ast.rb', line 807

def val
  @val
end

Instance Method Details

#compute_type(ctx) ⇒ Object



815
816
817
# File 'lib/ast.rb', line 815

def compute_type(ctx)
	@type
end

#evaluate(ctx) ⇒ Object



819
820
821
# File 'lib/ast.rb', line 819

def evaluate(ctx)
	@val
end