Class: FixtureFox::AstRecordMember

Inherits:
AstMember show all
Includes:
AstRecord
Defined in:
lib/fixture_fox/ast.rb

Instance Attribute Summary collapse

Attributes inherited from AstMember

#column, #ident

Attributes inherited from AstNode

#children, #parent, #type

Instance Method Summary collapse

Methods inherited from AstNode

#dump, #inspect

Constructor Details

#initialize(record, ident, anchor = nil) ⇒ AstRecordMember

Returns a new instance of AstRecordMember.



135
136
137
138
# File 'lib/fixture_fox/ast.rb', line 135

def initialize(record, ident, anchor = nil)
  super(record, ident)
  @anchor = anchor
end

Instance Attribute Details

#anchorObject (readonly)

Can be nil



132
133
134
# File 'lib/fixture_fox/ast.rb', line 132

def anchor
  @anchor
end

#idObject

Assigned by the analyzer



133
134
135
# File 'lib/fixture_fox/ast.rb', line 133

def id
  @id
end

Instance Method Details

#to_sObject



140
# File 'lib/fixture_fox/ast.rb', line 140

def to_s() "#{ident}: AstRecordMember" + (anchor ? " #{anchor.litt}" : "") end