Class: IV::Phonic::AST::IdentifierAccess
- Inherits:
-
Expression
- Object
- Node
- Expression
- IV::Phonic::AST::IdentifierAccess
- Defined in:
- lib/iv/phonic/ast.rb
Instance Method Summary collapse
-
#initialize(parent, expr) ⇒ IdentifierAccess
constructor
A new instance of IdentifierAccess.
- #to_source ⇒ Object
Methods inherited from Expression
Methods inherited from Node
#begin_position, #end_position, #program, #source
Constructor Details
#initialize(parent, expr) ⇒ IdentifierAccess
Returns a new instance of IdentifierAccess.
497 498 499 500 501 |
# File 'lib/iv/phonic/ast.rb', line 497 def initialize parent, expr super parent, expr @target = Expression.as self, expr[:target] @key = Identifier.new self, expr[:key] end |
Instance Method Details
#to_source ⇒ Object
503 504 505 |
# File 'lib/iv/phonic/ast.rb', line 503 def to_source "#{@target.to_source}.#{@key.to_source}" end |