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

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

Instance Method Summary collapse

Instance Method Details

#compile(lexical_address, builder) ⇒ Object



1422
1423
1424
# File 'lib/treetop/compiler/metagrammar.rb', line 1422

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

#inline_modulesObject



1426
1427
1428
# File 'lib/treetop/compiler/metagrammar.rb', line 1426

def inline_modules
  sequence_primary.inline_modules
end

#label_nameObject



1430
1431
1432
1433
1434
1435
1436
1437
1438
# File 'lib/treetop/compiler/metagrammar.rb', line 1430

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