Class: Chelsy::Operator::Access

Inherits:
Postfix show all
Defined in:
lib/chelsy/ast.rb

Overview

=== 6.5.2.3 Structure and union members

Direct Known Subclasses

IndirectAccess

Instance Attribute Summary collapse

Attributes inherited from Unary

#operand

Attributes inherited from Element

#fragments, #post_fragments

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

precedence

Constructor Details

#initialize(object, name, **rest) ⇒ Access

Returns a new instance of Access.



623
624
625
626
# File 'lib/chelsy/ast.rb', line 623

def initialize(object, name, **rest)
  @name = Syntax::Ident.ensure(name)
  super object, **rest
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



619
620
621
# File 'lib/chelsy/ast.rb', line 619

def name
  @name
end

Class Method Details

.operatorObject



621
# File 'lib/chelsy/ast.rb', line 621

def self.operator; :"." end

Instance Method Details

#objectObject



628
# File 'lib/chelsy/ast.rb', line 628

def object; operand end