Class: Lrama::Grammar::Printer
- Inherits:
-
Struct
- Object
- Struct
- Lrama::Grammar::Printer
- Defined in:
- lib/lrama/grammar/printer.rb
Instance Attribute Summary collapse
-
#ident_or_tags ⇒ Object
Returns the value of attribute ident_or_tags.
-
#lineno ⇒ Object
Returns the value of attribute lineno.
-
#token_code ⇒ Object
Returns the value of attribute token_code.
Instance Method Summary collapse
Instance Attribute Details
#ident_or_tags ⇒ Object
Returns the value of attribute ident_or_tags
5 6 7 |
# File 'lib/lrama/grammar/printer.rb', line 5 def @ident_or_tags end |
#lineno ⇒ Object
Returns the value of attribute lineno
5 6 7 |
# File 'lib/lrama/grammar/printer.rb', line 5 def lineno @lineno end |
#token_code ⇒ Object
Returns the value of attribute token_code
5 6 7 |
# File 'lib/lrama/grammar/printer.rb', line 5 def token_code @token_code end |
Instance Method Details
#translated_code(tag) ⇒ Object
6 7 8 |
# File 'lib/lrama/grammar/printer.rb', line 6 def translated_code(tag) Code::PrinterCode.new(type: :printer, token_code: token_code, tag: tag).translated_code end |