Module: Treetop::Compiler::Metagrammar::LabeledSequencePrimary1

Defined in:
lib/treetop/compiler/metagrammar.rb

Instance Method Summary collapse

Instance Method Details

#compile(lexical_address, builder) ⇒ Object



1117
1118
1119
# File 'lib/treetop/compiler/metagrammar.rb', line 1117

def compile(lexical_address, builder)
  sequence_primary.compile(lexical_address, builder)
end

#inline_modulesObject



1121
1122
1123
# File 'lib/treetop/compiler/metagrammar.rb', line 1121

def inline_modules
  sequence_primary.inline_modules
end

#label_nameObject



1125
1126
1127
1128
1129
1130
1131
1132
1133
# File 'lib/treetop/compiler/metagrammar.rb', line 1125

def label_name
  if label.name
    label.name
  elsif sequence_primary.instance_of?(Nonterminal)
    sequence_primary.text_value
  else
    nil
  end
end