Class: Dhallish::Ast::Literal_Node
- Inherits:
-
Object
- Object
- Dhallish::Ast::Literal_Node
- Defined in:
- lib/ast.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#val ⇒ Object
Returns the value of attribute val.
Instance Method Summary collapse
- #compute_type(ctx) ⇒ Object
- #evaluate(ctx) ⇒ Object
-
#initialize(val, type) ⇒ Literal_Node
constructor
A new instance of Literal_Node.
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
#type ⇒ Object
Returns the value of attribute type.
808 809 810 |
# File 'lib/ast.rb', line 808 def type @type end |
#val ⇒ Object
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 |