Class: Prism::Translation::Parser33
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Parser,
Parser::Base
|
|
|
Instance Chain:
self,
Parser,
Parser::Base
|
|
| Inherits: |
Prism::Translation::Parser
|
| Defined in: | lib/prism/translation/parser33.rb |
Overview
This class is the entry-point for Ruby 3.3 of Parser.
Constant Summary
Parser - Inherited
Class Method Summary
Parser - Inherited
| .new | The |
Instance Method Summary
- #version Internal use only
Parser - Inherited
| #default_encoding | The default encoding for Ruby files is UTF-8. |
| #parse | Parses a source buffer and returns the AST. |
| #parse_with_comments | Parses a source buffer and returns the AST and the source code comments. |
| #tokenize | Parses a source buffer and returns the AST, the source code comments, and the tokens emitted by the lexer. |
| #try_declare_numparam | Since prism resolves num params for us, we don’t need to support this kind of logic here. |
| #build_ast | Build the parser gem AST from the prism AST. |
| #build_comments | Build the parser gem comments from the prism comments. |
| #build_offset_cache |
|
| #build_range | Build a range from a prism location. |
| #build_tokens | Build the parser gem tokens from the prism tokens. |
| #convert_for_prism | |
| #error_diagnostic | Build a diagnostic from the given prism parse error. |
| #prism_options | Options for how prism should parse/lex the source. |
| #unwrap | If there was a error generated during the parse, then raise an appropriate syntax error. |
| #valid_error? | This is a hook to allow consumers to disable some errors if they don’t want them to block creating the syntax tree. |
| #valid_warning? | This is a hook to allow consumers to disable some warnings if they don’t want them to block creating the syntax tree. |
| #warning_diagnostic | Build a diagnostic from the given prism parse warning. |
| #version, #yyerror | |
Constructor Details
This class inherits a constructor from Prism::Translation::Parser
Instance Method Details
#version
# File 'lib/prism/translation/parser33.rb', line 8
def version # :nodoc: 33 end