Class: Rubycc::Front::AST::MemberAccess

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

Overview

A struct member access. base is the postfix-expression on the left, member the identifier String on the right and arrow false for the "." form (base is the struct itself) or true for the "->" form (base is a pointer to the struct, so "p->m" means "(*p).m"). Both forms are lvalues: the generator lowers either to the base struct's address plus the member's constant offset, then reads or writes through it.

Instance Attribute Summary collapse

Instance Attribute Details

#arrowObject (readonly)

Returns the value of attribute arrow

Returns:

  • (Object)

    the current value of arrow



138
139
140
# File 'lib/rubycc/front/ast.rb', line 138

def arrow
  @arrow
end

#baseObject (readonly)

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



138
139
140
# File 'lib/rubycc/front/ast.rb', line 138

def base
  @base
end

#memberObject (readonly)

Returns the value of attribute member

Returns:

  • (Object)

    the current value of member



138
139
140
# File 'lib/rubycc/front/ast.rb', line 138

def member
  @member
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



138
139
140
# File 'lib/rubycc/front/ast.rb', line 138

def token
  @token
end