diff options
Diffstat (limited to 'tool/lrama/lib/lrama/grammar/error_token.rb')
-rw-r--r-- | tool/lrama/lib/lrama/grammar/error_token.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tool/lrama/lib/lrama/grammar/error_token.rb b/tool/lrama/lib/lrama/grammar/error_token.rb new file mode 100644 index 0000000000..8efde7df33 --- /dev/null +++ b/tool/lrama/lib/lrama/grammar/error_token.rb @@ -0,0 +1,9 @@ +module Lrama + class Grammar + class ErrorToken < Struct.new(:ident_or_tags, :token_code, :lineno, keyword_init: true) + def translated_code(tag) + Code::PrinterCode.new(type: :error_token, token_code: token_code, tag: tag).translated_code + end + end + end +end |