Class: Loxxy::Ast::LoxVariableExpr
- Defined in:
- lib/loxxy/ast/lox_variable_expr.rb
Overview
This AST node represents a mention of a variable
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Variable name.
Attributes inherited from LoxNode
Instance Method Summary collapse
-
#initialize(aPosition, aName) ⇒ LoxVariableExpr
constructor
A new instance of LoxVariableExpr.
Methods inherited from LoxNode
Methods included from ASTVisitee
Constructor Details
#initialize(aPosition, aName) ⇒ LoxVariableExpr
Returns a new instance of LoxVariableExpr.
14 15 16 17 |
# File 'lib/loxxy/ast/lox_variable_expr.rb', line 14 def initialize(aPosition, aName) super(aPosition) @name = aName end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns variable name.
10 11 12 |
# File 'lib/loxxy/ast/lox_variable_expr.rb', line 10 def name @name end |