# typed: true # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `parser` gem. # Please instead update this file by running `bin/tapioca gem parser`. # @api public # # source://parser-3.1.2.1/lib/parser.rb:19 module Parser ; end # @api public # # source://parser-3.1.2.1/lib/parser.rb:24 module Parser::AST ; end # {Parser::AST::Node} contains information about a single AST node and its # child nodes. It extends the basic [AST::Node](http://rdoc.info/gems/ast/AST/Node) # class provided by gem [ast](http://rdoc.info/gems/ast). # # @api public # # source://parser-3.1.2.1/lib/parser/ast/node.rb:17 class Parser::AST::Node < ::AST::Node # Assigns various properties to this AST node. Currently only the # location can be set. # # @api public # @option properties # @param properties [Hash] # # source://parser-3.1.2.1/lib/parser/ast/node.rb:30 def assign_properties(properties) ; end # Source map for this Node. # # @api public # @return [Parser::Source::Map] # # source://parser-3.1.2.1/lib/parser/ast/node.rb:18 def loc; end # Source map for this Node. # # @api public # @return [Parser::Source::Map] # # source://parser-3.1.2.1/lib/parser/ast/node.rb:18 def location; end end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:9 class Parser::AST::Processor < ::AST::Processor # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_alias(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_and(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_and_asgn(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:116 def on_arg(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_arg_expr(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_args(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:103 def on_argument(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_array(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_array_pattern(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_array_pattern_with_tail(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:32 def on_back_ref(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_begin(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_block(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_block_pass(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:116 def on_blockarg(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_blockarg_expr(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_break(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_case(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_case_match(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:87 def on_casgn(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_class(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:79 def on_const(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_const_pattern(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:176 def on_csend(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:32 def on_cvar(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:56 def on_cvasgn(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:155 def on_def(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_defined?(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:164 def on_defs(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_dstr(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_dsym(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_eflipflop(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:283 def on_empty_else(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_ensure(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_erange(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_find_pattern(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_for(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:116 def on_forward_arg(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:32 def on_gvar(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:56 def on_gvasgn(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_hash(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_hash_pattern(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_if(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_if_guard(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_iflipflop(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_in_match(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_in_pattern(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_index(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_indexasgn(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_irange(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:32 def on_ivar(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:56 def on_ivasgn(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:116 def on_kwarg(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_kwargs(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_kwbegin(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:116 def on_kwoptarg(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:116 def on_kwrestarg(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_kwsplat(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_lambda(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:32 def on_lvar(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:56 def on_lvasgn(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_masgn(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_match_alt(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_match_as(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_match_current_line(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_match_pattern(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_match_pattern_p(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_match_rest(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:32 def on_match_var(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_match_with_lvasgn(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_mlhs(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_module(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_next(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_not(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:32 def on_nth_ref(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:193 def on_numblock(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:68 def on_op_asgn(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:116 def on_optarg(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_or(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_or_asgn(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_pair(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_pin(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_postexe(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_preexe(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:130 def on_procarg0(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_redo(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_regexp(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_resbody(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_rescue(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:116 def on_restarg(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_restarg_expr(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_retry(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_return(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_sclass(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:176 def on_send(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:116 def on_shadowarg(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_splat(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_super(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_undef(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_unless_guard(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_until(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_until_post(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:27 def on_var(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:43 def on_vasgn(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_when(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_while(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_while_post(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_xstr(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def on_yield(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:276 def process_argument_node(node) ; end # @api public # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:10 def process_regular_node(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:268 def process_var_asgn_node(node) ; end # @api public # @private # # source://parser-3.1.2.1/lib/parser/ast/processor.rb:260 def process_variable_node(node) ; end end # Base class for version-specific parsers. # # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:29 class Parser::Base < ::Racc::Parser # @api public # @param builder [Parser::Builders::Default] The AST builder to use. # @return [Base] a new instance of Base # # source://parser-3.1.2.1/lib/parser/base.rb:126 def initialize(builder = T.unsafe(nil)) ; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:114 def builder; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:117 def context; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:119 def current_arg_stack; end # @api public # @return [Parser::Diagnostic::Engine] # # source://parser-3.1.2.1/lib/parser/base.rb:113 def diagnostics; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:112 def lexer; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:118 def max_numparam_stack; end # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. # # @api public # @param source_buffer [Parser::Source::Buffer] The source buffer to parse. # @return [Parser::AST::Node, nil] # # source://parser-3.1.2.1/lib/parser/base.rb:186 def parse(source_buffer) ; end # Parses a source buffer and returns the AST and the source code comments. # # @api public # @return [Array] # @see #parse # @see Parser::Source::Comment#associate # # source://parser-3.1.2.1/lib/parser/base.rb:204 def parse_with_comments(source_buffer) ; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:121 def pattern_hash_keys; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:120 def pattern_variables; end # Resets the state of the parser. # # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:167 def reset; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:116 def source_buffer; end # @api public # @return [Parser::StaticEnvironment] # # source://parser-3.1.2.1/lib/parser/base.rb:115 def static_env; end # Parses a source buffer and returns the AST, the source code comments, # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} # is raised, unless `recover` is true. In case of an error # (non-fatal or recovered), `nil` is returned instead of the AST, and # comments as well as tokens are only returned up to the location of # the error. # # Currently, token stream format returned by #tokenize is not documented, # but is considered part of a public API and only changed according # to Semantic Versioning. # # However, note that the exact token composition of various constructs # might vary. For example, a string `"foo"` is represented equally well # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and # `:tSTRING "foo"`; such details must not be relied upon. # # @api public # @param source_buffer [Parser::Source::Buffer] # @param recover [Boolean] If true, recover from syntax errors. False by default. # @return [Array] # # source://parser-3.1.2.1/lib/parser/base.rb:233 def tokenize(source_buffer, recover = T.unsafe(nil)) ; end private # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:257 def check_kwarg_name(name_t) ; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:266 def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)) ; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:251 def next_token; end # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:282 def on_error(error_token_id, error_value, value_stack) ; end class << self # @api public # @return [Parser::Base] parser with the default options set. # # source://parser-3.1.2.1/lib/parser/base.rb:84 def default_parser; end # Parses a string of Ruby code and returns the AST. If the source # cannot be parsed, {SyntaxError} is raised and a diagnostic is # printed to `stderr`. # # @api public # @example # Parser::Base.parse('puts "hello"') # @param string [String] The block of code to parse. # @param file [String] The name of the file the code originated from. # @param line [Numeric] The initial line number. # @return [Parser::AST::Node] # # source://parser-3.1.2.1/lib/parser/base.rb:30 def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)) ; end # Parses Ruby source code by reading it from a file. If the source # cannot be parsed, {SyntaxError} is raised and a diagnostic is # printed to `stderr`. # # @api public # @param filename [String] Path to the file to parse. # @return [Parser::AST::Node] # @see #parse # # source://parser-3.1.2.1/lib/parser/base.rb:64 def parse_file(filename) ; end # Parses Ruby source code by reading it from a file and returns the AST and # comments. If the source cannot be parsed, {SyntaxError} is raised and a # diagnostic is printed to `stderr`. # # @api public # @param filename [String] Path to the file to parse. # @return [Array] # @see #parse # # source://parser-3.1.2.1/lib/parser/base.rb:77 def parse_file_with_comments(filename) ; end # Parses a string of Ruby code and returns the AST and comments. If the # source cannot be parsed, {SyntaxError} is raised and a diagnostic is # printed to `stderr`. # # @api public # @example # Parser::Base.parse_with_comments('puts "hello"') # @param string [String] The block of code to parse. # @param file [String] The name of the file the code originated from. # @param line [Numeric] The initial line number. # @return [Array] # # source://parser-3.1.2.1/lib/parser/base.rb:49 def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)) ; end private # @api public # # source://parser-3.1.2.1/lib/parser/base.rb:97 def setup_source_buffer(file, line, string, encoding) ; end end end # @api public # # source://parser-3.1.2.1/lib/parser.rb:72 module Parser::Builders ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:8 class Parser::Builders::Default # source://parser-3.1.2.1/lib/parser/builders/default.rb:243 def initialize; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:696 def __ENCODING__(__ENCODING__t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:348 def __FILE__(__FILE__t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:312 def __LINE__(__LINE__t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:622 def accessible(node) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:871 def alias(alias_t, to, from) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:910 def arg(name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1000 def arg_expr(expr) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:880 def args(begin_t, args, end_t, check_args = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:440 def array(begin_t, elements, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1575 def array_pattern(lbrack_t, elements, rbrack_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:760 def assign(lhs, eql_t, rhs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:705 def assignable(node) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:540 def associate(begin_t, pairs, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1156 def attr_asgn(receiver, dot_t, selector_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:612 def back_ref(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1420 def begin(begin_t, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1362 def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1438 def begin_keyword(begin_t, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1190 def binary_op(receiver, operator_t, arg) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1107 def block(method_call, begin_t, args, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1142 def block_pass(amper_t, arg) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:975 def blockarg(amper_t, name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1020 def blockarg_expr(amper_t, expr) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1098 def call_lambda(lambda_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1081 def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1061 def call_type_for_dot(dot_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1295 def case(case_t, expr, when_bodies, else_t, else_body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1458 def case_match(case_t, expr, in_bodies, else_t, else_body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:343 def character(char_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:284 def complex(complex_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1408 def compstmt(statements) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1271 def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1277 def condition_mod(if_true, if_false, cond_t, cond) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:679 def const(name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:691 def const_fetch(scope, t_colon2, name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:684 def const_global(t_colon3, name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:756 def const_op_assignable(node) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1605 def const_pattern(const, ldelim_t, pattern, rdelim_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:607 def cvar(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:388 def dedent_string(node, dedent_level) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:807 def def_class(class_t, name, lt_t, superclass, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:838 def def_endless_method(def_t, name_t, args, assignment_t, body) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:856 def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:830 def def_method(def_t, name_t, args, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:820 def def_module(module_t, name, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:814 def def_sclass(class_t, lshft_t, expr, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:846 def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:237 def emit_file_line_as_literals; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:237 def emit_file_line_as_literals=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:265 def false(false_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1596 def find_pattern(lbrack_t, elements, rbrack_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:276 def float(float_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1316 def for(for_t, iterator, in_t, iteratee, do_t, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:906 def forward_arg(dots_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:896 def forward_only_args(begin_t, dots_t, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1077 def forwarded_args(dots_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:602 def gvar(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1569 def hash_pattern(lbrace_t, kwargs, rbrace_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:592 def ident(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1485 def if_guard(if_t, if_body) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1464 def in_match(lhs, in_t, rhs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1479 def in_pattern(in_t, pattern, guard, then_t, body) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1165 def index(receiver, lbrack_t, indexes, rbrack_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1179 def index_asgn(receiver, lbrack_t, indexes, rbrack_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:272 def integer(integer_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:597 def ivar(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1324 def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:937 def kwarg(name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:963 def kwnilarg(dstar_t, nil_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:944 def kwoptarg(name_t, value) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:951 def kwrestarg(dstar_t, name_t = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:535 def kwsplat(dstar_t, arg) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1264 def logical_op(type, lhs, op_t, rhs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1302 def loop(type, keyword_t, cond, do_t, body, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1307 def loop_mod(type, body, keyword_t, cond) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1619 def match_alt(left, pipe_t, right) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1626 def match_as(value, assoc_t, as) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1505 def match_hash_var(name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1519 def match_hash_var_from_str(begin_t, strings, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1657 def match_label(label_type, label) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1633 def match_nil_pattern(dstar_t, nil_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1212 def match_op(receiver, match_t, arg) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1638 def match_pair(label_type, label, value) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1469 def match_pattern(lhs, match_t, rhs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1474 def match_pattern_p(lhs, match_t, rhs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1558 def match_rest(star_t, name_t = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1493 def match_var(name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1601 def match_with_trailing_comma(match, comma_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:798 def multi_assign(lhs, eql_t, rhs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:793 def multi_lhs(begin_t, items, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:255 def nil(nil_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1240 def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:617 def nth_ref(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:892 def numargs(max_numparam) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1031 def objc_kwarg(kwname_t, assoc_t, name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1045 def objc_restarg(star_t, name = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1147 def objc_varargs(pair, rest_of_varargs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:767 def op_assign(lhs, op_t, rhs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:917 def optarg(name_t, eql_t, value) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:488 def pair(key, assoc_t, value) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:505 def pair_keyword(key_t, value) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:521 def pair_label(key_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:493 def pair_list_18(list) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:513 def pair_quoted(begin_t, parts, end_t, value) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:225 def parser; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:225 def parser=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1614 def pin(pin_t, var) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1347 def postexe(postexe_t, lbrace_t, compstmt, rbrace_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1342 def preexe(preexe_t, lbrace_t, compstmt, rbrace_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:985 def procarg0(arg) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:578 def range_exclusive(lhs, dot3_t, rhs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:573 def range_inclusive(lhs, dot2_t, rhs) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:280 def rational(rational_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:426 def regexp_compose(begin_t, parts, end_t, options) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:417 def regexp_options(regopt_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1354 def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:926 def restarg(star_t, name_t = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1009 def restarg_expr(star_t, expr = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:587 def self(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:968 def shadowarg(name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:445 def splat(star_t, arg = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:319 def string(string_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:329 def string_compose(begin_t, parts, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:324 def string_internal(string_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:355 def symbol(symbol_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:365 def symbol_compose(begin_t, parts, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:360 def symbol_internal(symbol_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:469 def symbols_compose(begin_t, parts, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1282 def ternary(cond, question_t, if_true, colon_t, if_false) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:260 def true(true_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:294 def unary_num(unary_t, numeric) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1228 def unary_op(op_t, receiver) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:866 def undef_method(undef_t, names) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1489 def unless_guard(unless_t, unless_body) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1289 def when(when_t, patterns, then_t, body) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:455 def word(parts) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:464 def words_compose(begin_t, parts, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:381 def xstring_compose(begin_t, parts, end_t) ; end private # source://parser-3.1.2.1/lib/parser/builders/default.rb:1796 def arg_name_collides?(this_name, that_name) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1992 def arg_prefix_map(op_t, name_t = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1966 def binary_op_map(left_e, op_t, right_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2094 def block_map(receiver_l, begin_t, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1771 def check_assignment_to_numparam(name, loc) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1673 def check_condition(cond) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1742 def check_duplicate_arg(this_arg, map = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1717 def check_duplicate_args(args, map = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1829 def check_duplicate_pattern_key(name, loc) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1819 def check_duplicate_pattern_variable(name, loc) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1811 def check_lvar_name(name, loc) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1786 def check_reserved_for_numparam(name, loc) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2251 def collapse_string_parts?(parts) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1917 def collection_map(begin_t, parts, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2121 def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1952 def constant_map(scope, colon2_t, name_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2025 def definition_map(keyword_t, operator_t, name_t, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1858 def delimited_string_map(string_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2273 def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2165 def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2031 def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1913 def expr_map(loc) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2146 def for_map(keyword_t, in_t, begin_t, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2193 def guard_map(keyword_t, guard_body_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2083 def index_map(receiver_e, lbrack_t, rbrack_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1849 def join_exprs(left_expr, right_expr) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2099 def keyword_map(keyword_t, begin_t, args, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2116 def keyword_mod_map(pre_e, keyword_t, post_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2002 def kwarg_map(name_t, value_e = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2304 def kwargs?(node) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2268 def loc(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2015 def module_definition_map(keyword_t, name_e, operator_t, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1841 def n(type, children, source_map) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1845 def n0(type, source_map) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:288 def numeric(kind, token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1883 def pair_keyword_map(key_t, value_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1898 def pair_quoted_map(begin_t, end_t, value_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1869 def prefix_string_map(symbol) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1980 def range_map(start_e, op_t, end_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1947 def regexp_map(begin_t, end_t, options_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2152 def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2294 def rewrite_hash_args_to_kwargs(args) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2065 def send_binary_op_map(lhs_e, selector_t, rhs_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2088 def send_index_map(receiver_e, lbrack_t, rbrack_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2039 def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2071 def send_unary_op_map(selector_t, arg_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2224 def static_regexp(parts, options) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2244 def static_regexp_node(node) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2207 def static_string(nodes) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1933 def string_map(begin_t, parts, end_t) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2260 def string_value(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2141 def ternary_map(begin_e, question_t, mid_e, colon_t, end_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1854 def token_map(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1970 def unary_op_map(op_t, arg_e = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1878 def unquoted_map(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2282 def validate_definee(definee) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1756 def validate_no_forward_arg_after_restarg(args) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2256 def value(token) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:2059 def var_send_map(variable_e) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:1962 def variable_map(name_t) ; end class << self # source://parser-3.1.2.1/lib/parser/builders/default.rb:97 def emit_arg_inside_procarg0; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:97 def emit_arg_inside_procarg0=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:58 def emit_encoding; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:58 def emit_encoding=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:126 def emit_forward_arg; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:126 def emit_forward_arg=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:80 def emit_index; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:80 def emit_index=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:174 def emit_kwargs; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:174 def emit_kwargs=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:22 def emit_lambda; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:22 def emit_lambda=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:203 def emit_match_pattern; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:203 def emit_match_pattern=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:40 def emit_procarg0; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:40 def emit_procarg0=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/builders/default.rb:211 def modernize; end end end # {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} # detects a clobbering rewrite action. This class inherits {RuntimeError} # rather than {StandardError} for backward compatibility. # # @api public # # source://parser-3.1.2.1/lib/parser/clobbering_error.rb:11 class Parser::ClobberingError < ::RuntimeError; end # Context of parsing that is represented by a stack of scopes. # # Supported states: # + :class - in the class body (class A; end) # + :module - in the module body (module M; end) # + :sclass - in the singleton class body (class << obj; end) # + :def - in the method body (def m; end) # + :defs - in the singleton method body (def self.m; end) # + :def_open_args - in the arglist of the method definition # keep in mind that it's set **only** after reducing the first argument, # if you need to handle the first argument check `lex_state == expr_fname` # + :block - in the block body (tap {}) # + :lambda - in the lambda body (-> {}) # # source://parser-3.1.2.1/lib/parser/context.rb:18 class Parser::Context # @return [Context] a new instance of Context # # source://parser-3.1.2.1/lib/parser/context.rb:29 def initialize; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_argdef; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_argdef=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_block; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_block=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_class; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_class=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_def; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_def=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_defined; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_defined=(_arg0) ; end # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/context.rb:45 def in_dynamic_block?; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_kwarg; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_kwarg=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_lambda; end # source://parser-3.1.2.1/lib/parser/context.rb:43 def in_lambda=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/context.rb:33 def reset; end end # source://parser-3.1.2.1/lib/parser/context.rb:19 Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) # Stack that holds names of current arguments, # i.e. while parsing # def m1(a = (def m2(b = def m3(c = 1); end); end)); end # ^ # stack is [:a, :b, :c] # # Emulates `p->cur_arg` in MRI's parse.y # # @api private # # source://parser-3.1.2.1/lib/parser/current_arg_stack.rb:14 class Parser::CurrentArgStack # @api private # @return [CurrentArgStack] a new instance of CurrentArgStack # # source://parser-3.1.2.1/lib/parser/current_arg_stack.rb:17 def initialize; end # @api private # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/current_arg_stack.rb:22 def empty?; end # @api private # # source://parser-3.1.2.1/lib/parser/current_arg_stack.rb:34 def pop; end # @api private # # source://parser-3.1.2.1/lib/parser/current_arg_stack.rb:26 def push(value) ; end # @api private # # source://parser-3.1.2.1/lib/parser/current_arg_stack.rb:38 def reset; end # @api private # # source://parser-3.1.2.1/lib/parser/current_arg_stack.rb:30 def set(value) ; end # @api private # # source://parser-3.1.2.1/lib/parser/current_arg_stack.rb:15 def stack; end # @api private # # source://parser-3.1.2.1/lib/parser/current_arg_stack.rb:42 def top; end end # @api private # # source://parser-3.1.2.1/lib/parser/deprecation.rb:7 module Parser::Deprecation # @api private # # source://parser-3.1.2.1/lib/parser/deprecation.rb:9 def warn_of_deprecation; end # @api private # # source://parser-3.1.2.1/lib/parser/deprecation.rb:8 def warned_of_deprecation=(_arg0) ; end end # @api public # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:31 class Parser::Diagnostic # @api public # @param level [Symbol] # @param reason [Symbol] # @param arguments [Hash] # @param location [Parser::Source::Range] # @param highlights [Array] # @return [Diagnostic] a new instance of Diagnostic # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:49 def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)) ; end # @api public # @return [Symbol] extended arguments that describe the error # @see Parser::MESSAGES # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:39 def arguments; end # Supplementary error-related source ranges. # # @api public # @return [Array] # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:40 def highlights; end # @api public # @return [Symbol] diagnostic level # @see LEVELS # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:39 def level; end # Main error-related source range. # # @api public # @return [Parser::Source::Range] # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:40 def location; end # @api public # @return [String] the rendered message. # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:69 def message; end # @api public # @return [Symbol] reason for error # @see Parser::MESSAGES # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:39 def reason; end # Renders the diagnostic message as a clang-like diagnostic. # # @api public # @example # diagnostic.render # => # # [ # # "(fragment:0):1:5: error: unexpected token $end", # # "foo +", # # " ^" # # ] # @return [Array] # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:86 def render; end private # If necessary, shrink a `Range` so as to include only the first line. # # @api public # @return [Parser::Source::Range] # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:142 def first_line_only(range) ; end # If necessary, shrink a `Range` so as to include only the last line. # # @api public # @return [Parser::Source::Range] # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:155 def last_line_only(range) ; end # Renders one source line in clang diagnostic style, with highlights. # # @api public # @return [Array] # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:110 def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)) ; end end # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:36 class Parser::Diagnostic::Engine # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:45 def initialize(consumer = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:39 def all_errors_are_fatal; end # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:39 def all_errors_are_fatal=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:37 def consumer; end # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:37 def consumer=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:40 def ignore_warnings; end # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:40 def ignore_warnings=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:64 def process(diagnostic) ; end protected # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:86 def ignore?(diagnostic) ; end # source://parser-3.1.2.1/lib/parser/diagnostic/engine.rb:97 def raise?(diagnostic) ; end end # Collection of the available diagnostic levels. # # @api public # @return [Array] # # source://parser-3.1.2.1/lib/parser/diagnostic.rb:37 Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) # line 3 "lib/parser/lexer.rl" # # === BEFORE YOU START === # # Read the Ruby Hacking Guide chapter 11, available in English at # http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ # # Remember two things about Ragel scanners: # # 1) Longest match wins. # # 2) If two matches have the same length, the first # in source code wins. # # General rules of making Ragel and Bison happy: # # * `p` (position) and `@te` contain the index of the character # they're pointing to ("current"), plus one. `@ts` contains the index # of the corresponding character. The code for extracting matched token is: # # @source_buffer.slice(@ts...@te) # # * If your input is `foooooooobar` and the rule is: # # 'f' 'o'+ # # the result will be: # # foooooooobar # ^ ts=0 ^ p=te=9 # # * A Ragel lexer action should not emit more than one token, unless # you know what you are doing. # # * All Ragel commands (fnext, fgoto, ...) end with a semicolon. # # * If an action emits the token and transitions to another state, use # these Ragel commands: # # emit($whatever) # fnext $next_state; fbreak; # # If you perform `fgoto` in an action which does not emit a token nor # rewinds the stream pointer, the parser's side-effectful, # context-sensitive lookahead actions will break in a hard to detect # and debug way. # # * If an action does not emit a token: # # fgoto $next_state; # # * If an action features lookbehind, i.e. matches characters with the # intent of passing them to another action: # # p = @ts - 1 # fgoto $next_state; # # or, if the lookbehind consists of a single character: # # fhold; fgoto $next_state; # # * Ragel merges actions. So, if you have `e_lparen = '(' %act` and # `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result # _will_ invoke the action `act`. # # e_something stands for "something with **e**mbedded action". # # * EOF is explicit and is matched by `c_eof`. If you want to introspect # the state of the lexer, add this rule to the state: # # c_eof => do_eof; # # * If you proceed past EOF, the lexer will complain: # # NoMethodError: undefined method `ord' for nil:NilClass # # source://parser-3.1.2.1/lib/parser/lexer.rb:82 class Parser::Lexer # @return [Lexer] a new instance of Lexer # # source://parser-3.1.2.1/lib/parser/lexer.rb:11148 def initialize(version) ; end # Return next token: [type, value]. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11303 def advance; end # Returns the value of attribute cmdarg. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11142 def cmdarg; end # Sets the attribute cmdarg # # @param value the value to set the attribute cmdarg to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11142 def cmdarg=(_arg0) ; end # Returns the value of attribute cmdarg_stack. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11146 def cmdarg_stack; end # Returns the value of attribute command_start. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11142 def command_start; end # Sets the attribute command_start # # @param value the value to set the attribute command_start to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11142 def command_start=(_arg0) ; end # Returns the value of attribute comments. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11144 def comments; end # Sets the attribute comments # # @param value the value to set the attribute comments to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11144 def comments=(_arg0) ; end # Returns the value of attribute cond. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11142 def cond; end # Sets the attribute cond # # @param value the value to set the attribute cond to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11142 def cond=(_arg0) ; end # Returns the value of attribute cond_stack. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11146 def cond_stack; end # Returns the value of attribute context. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11142 def context; end # Sets the attribute context # # @param value the value to set the attribute context to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11142 def context=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11295 def dedent_level; end # Returns the value of attribute diagnostics. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11138 def diagnostics; end # Sets the attribute diagnostics # # @param value the value to set the attribute diagnostics to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11138 def diagnostics=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11245 def encoding; end # Returns the value of attribute force_utf32. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11140 def force_utf32; end # Sets the attribute force_utf32 # # @param value the value to set the attribute force_utf32 to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11140 def force_utf32=(_arg0) ; end # Returns the value of attribute lambda_stack. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11146 def lambda_stack; end # Returns the value of attribute paren_nest. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11146 def paren_nest; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11282 def pop_cmdarg; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11291 def pop_cond; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11277 def push_cmdarg; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11286 def push_cond; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11159 def reset(reset_state = T.unsafe(nil)) ; end # Returns the value of attribute source_buffer. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11136 def source_buffer; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11224 def source_buffer=(source_buffer) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11269 def state; end # source://parser-3.1.2.1/lib/parser/lexer.rb:11273 def state=(state) ; end # Returns the value of attribute static_env. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11139 def static_env; end # Sets the attribute static_env # # @param value the value to set the attribute static_env to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11139 def static_env=(_arg0) ; end # Returns the value of attribute tokens. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11144 def tokens; end # Sets the attribute tokens # # @param value the value to set the attribute tokens to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11144 def tokens=(_arg0) ; end protected # source://parser-3.1.2.1/lib/parser/lexer.rb:24883 def arg_or_cmdarg(cmd_state) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24903 def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24857 def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24891 def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24873 def emit_do(do_block = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24867 def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24845 def encode_escape(ord) ; end # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/lexer.rb:24832 def eof_codepoint?(point) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24946 def literal; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24918 def next_state_for_literal(literal) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24950 def pop_literal; end # === LITERAL STACK === # # source://parser-3.1.2.1/lib/parser/lexer.rb:24912 def push_literal(*args) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24853 def range(s = T.unsafe(nil), e = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24840 def stack_pop; end # source://parser-3.1.2.1/lib/parser/lexer.rb:24849 def tok(s = T.unsafe(nil), e = T.unsafe(nil)) ; end # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/lexer.rb:24836 def version?(*versions) ; end class << self # Returns the value of attribute lex_en_expr_arg. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11080 def lex_en_expr_arg; end # Sets the attribute lex_en_expr_arg # # @param value the value to set the attribute lex_en_expr_arg to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11080 def lex_en_expr_arg=(_arg0) ; end # Returns the value of attribute lex_en_expr_beg. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11096 def lex_en_expr_beg; end # Sets the attribute lex_en_expr_beg # # @param value the value to set the attribute lex_en_expr_beg to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11096 def lex_en_expr_beg=(_arg0) ; end # Returns the value of attribute lex_en_expr_cmdarg. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11084 def lex_en_expr_cmdarg; end # Sets the attribute lex_en_expr_cmdarg # # @param value the value to set the attribute lex_en_expr_cmdarg to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11084 def lex_en_expr_cmdarg=(_arg0) ; end # Returns the value of attribute lex_en_expr_dot. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11076 def lex_en_expr_dot; end # Sets the attribute lex_en_expr_dot # # @param value the value to set the attribute lex_en_expr_dot to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11076 def lex_en_expr_dot=(_arg0) ; end # Returns the value of attribute lex_en_expr_end. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11108 def lex_en_expr_end; end # Sets the attribute lex_en_expr_end # # @param value the value to set the attribute lex_en_expr_end to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11108 def lex_en_expr_end=(_arg0) ; end # Returns the value of attribute lex_en_expr_endarg. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11088 def lex_en_expr_endarg; end # Sets the attribute lex_en_expr_endarg # # @param value the value to set the attribute lex_en_expr_endarg to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11088 def lex_en_expr_endarg=(_arg0) ; end # Returns the value of attribute lex_en_expr_endfn. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11072 def lex_en_expr_endfn; end # Sets the attribute lex_en_expr_endfn # # @param value the value to set the attribute lex_en_expr_endfn to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11072 def lex_en_expr_endfn=(_arg0) ; end # Returns the value of attribute lex_en_expr_fname. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11068 def lex_en_expr_fname; end # Sets the attribute lex_en_expr_fname # # @param value the value to set the attribute lex_en_expr_fname to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11068 def lex_en_expr_fname=(_arg0) ; end # Returns the value of attribute lex_en_expr_labelarg. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11100 def lex_en_expr_labelarg; end # Sets the attribute lex_en_expr_labelarg # # @param value the value to set the attribute lex_en_expr_labelarg to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11100 def lex_en_expr_labelarg=(_arg0) ; end # Returns the value of attribute lex_en_expr_mid. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11092 def lex_en_expr_mid; end # Sets the attribute lex_en_expr_mid # # @param value the value to set the attribute lex_en_expr_mid to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11092 def lex_en_expr_mid=(_arg0) ; end # Returns the value of attribute lex_en_expr_value. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11104 def lex_en_expr_value; end # Sets the attribute lex_en_expr_value # # @param value the value to set the attribute lex_en_expr_value to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11104 def lex_en_expr_value=(_arg0) ; end # Returns the value of attribute lex_en_expr_variable. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11064 def lex_en_expr_variable; end # Sets the attribute lex_en_expr_variable # # @param value the value to set the attribute lex_en_expr_variable to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11064 def lex_en_expr_variable=(_arg0) ; end # Returns the value of attribute lex_en_interp_backslash_delimited. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11044 def lex_en_interp_backslash_delimited; end # Sets the attribute lex_en_interp_backslash_delimited # # @param value the value to set the attribute lex_en_interp_backslash_delimited to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11044 def lex_en_interp_backslash_delimited=(_arg0) ; end # Returns the value of attribute lex_en_interp_backslash_delimited_words. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11052 def lex_en_interp_backslash_delimited_words; end # Sets the attribute lex_en_interp_backslash_delimited_words # # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11052 def lex_en_interp_backslash_delimited_words=(_arg0) ; end # Returns the value of attribute lex_en_interp_string. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11032 def lex_en_interp_string; end # Sets the attribute lex_en_interp_string # # @param value the value to set the attribute lex_en_interp_string to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11032 def lex_en_interp_string=(_arg0) ; end # Returns the value of attribute lex_en_interp_words. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11028 def lex_en_interp_words; end # Sets the attribute lex_en_interp_words # # @param value the value to set the attribute lex_en_interp_words to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11028 def lex_en_interp_words=(_arg0) ; end # Returns the value of attribute lex_en_leading_dot. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11112 def lex_en_leading_dot; end # Sets the attribute lex_en_leading_dot # # @param value the value to set the attribute lex_en_leading_dot to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11112 def lex_en_leading_dot=(_arg0) ; end # Returns the value of attribute lex_en_line_begin. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11120 def lex_en_line_begin; end # Sets the attribute lex_en_line_begin # # @param value the value to set the attribute lex_en_line_begin to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11120 def lex_en_line_begin=(_arg0) ; end # Returns the value of attribute lex_en_line_comment. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11116 def lex_en_line_comment; end # Sets the attribute lex_en_line_comment # # @param value the value to set the attribute lex_en_line_comment to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11116 def lex_en_line_comment=(_arg0) ; end # Returns the value of attribute lex_en_plain_backslash_delimited. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11048 def lex_en_plain_backslash_delimited; end # Sets the attribute lex_en_plain_backslash_delimited # # @param value the value to set the attribute lex_en_plain_backslash_delimited to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11048 def lex_en_plain_backslash_delimited=(_arg0) ; end # Returns the value of attribute lex_en_plain_backslash_delimited_words. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11056 def lex_en_plain_backslash_delimited_words; end # Sets the attribute lex_en_plain_backslash_delimited_words # # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11056 def lex_en_plain_backslash_delimited_words=(_arg0) ; end # Returns the value of attribute lex_en_plain_string. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11040 def lex_en_plain_string; end # Sets the attribute lex_en_plain_string # # @param value the value to set the attribute lex_en_plain_string to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11040 def lex_en_plain_string=(_arg0) ; end # Returns the value of attribute lex_en_plain_words. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11036 def lex_en_plain_words; end # Sets the attribute lex_en_plain_words # # @param value the value to set the attribute lex_en_plain_words to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11036 def lex_en_plain_words=(_arg0) ; end # Returns the value of attribute lex_en_regexp_modifiers. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11060 def lex_en_regexp_modifiers; end # Sets the attribute lex_en_regexp_modifiers # # @param value the value to set the attribute lex_en_regexp_modifiers to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11060 def lex_en_regexp_modifiers=(_arg0) ; end # Returns the value of attribute lex_error. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11023 def lex_error; end # Sets the attribute lex_error # # @param value the value to set the attribute lex_error to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11023 def lex_error=(_arg0) ; end # Returns the value of attribute lex_start. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11019 def lex_start; end # Sets the attribute lex_start # # @param value the value to set the attribute lex_start to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:11019 def lex_start=(_arg0) ; end private # Returns the value of attribute _lex_eof_trans. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10886 def _lex_eof_trans; end # Sets the attribute _lex_eof_trans # # @param value the value to set the attribute _lex_eof_trans to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10886 def _lex_eof_trans=(_arg0) ; end # Returns the value of attribute _lex_from_state_actions. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10753 def _lex_from_state_actions; end # Sets the attribute _lex_from_state_actions # # @param value the value to set the attribute _lex_from_state_actions to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10753 def _lex_from_state_actions=(_arg0) ; end # Returns the value of attribute _lex_index_offsets. # # source://parser-3.1.2.1/lib/parser/lexer.rb:604 def _lex_index_offsets; end # Sets the attribute _lex_index_offsets # # @param value the value to set the attribute _lex_index_offsets to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:604 def _lex_index_offsets=(_arg0) ; end # Returns the value of attribute _lex_indicies. # # source://parser-3.1.2.1/lib/parser/lexer.rb:737 def _lex_indicies; end # Sets the attribute _lex_indicies # # @param value the value to set the attribute _lex_indicies to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:737 def _lex_indicies=(_arg0) ; end # Returns the value of attribute _lex_key_spans. # # source://parser-3.1.2.1/lib/parser/lexer.rb:471 def _lex_key_spans; end # Sets the attribute _lex_key_spans # # @param value the value to set the attribute _lex_key_spans to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:471 def _lex_key_spans=(_arg0) ; end # Returns the value of attribute _lex_to_state_actions. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10620 def _lex_to_state_actions; end # Sets the attribute _lex_to_state_actions # # @param value the value to set the attribute _lex_to_state_actions to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10620 def _lex_to_state_actions=(_arg0) ; end # Returns the value of attribute _lex_trans_actions. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10420 def _lex_trans_actions; end # Sets the attribute _lex_trans_actions # # @param value the value to set the attribute _lex_trans_actions to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10420 def _lex_trans_actions=(_arg0) ; end # Returns the value of attribute _lex_trans_keys. # # source://parser-3.1.2.1/lib/parser/lexer.rb:87 def _lex_trans_keys; end # Sets the attribute _lex_trans_keys # # @param value the value to set the attribute _lex_trans_keys to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:87 def _lex_trans_keys=(_arg0) ; end # Returns the value of attribute _lex_trans_targs. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10220 def _lex_trans_targs; end # Sets the attribute _lex_trans_targs # # @param value the value to set the attribute _lex_trans_targs to. # # source://parser-3.1.2.1/lib/parser/lexer.rb:10220 def _lex_trans_targs=(_arg0) ; end end end # source://parser-3.1.2.1/lib/parser/lexer/dedenter.rb:5 class Parser::Lexer::Dedenter # source://parser-3.1.2.1/lib/parser/lexer/dedenter.rb:9 def initialize(dedent_level) ; end # source://parser-3.1.2.1/lib/parser/lexer/dedenter.rb:36 def dedent(string) ; end # source://parser-3.1.2.1/lib/parser/lexer/dedenter.rb:83 def interrupt; end end # source://parser-3.1.2.1/lib/parser/lexer/dedenter.rb:7 Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) # % # # source://parser-3.1.2.1/lib/parser/lexer.rb:11128 Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) # source://parser-3.1.2.1/lib/parser/lexer.rb:24991 Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) # source://parser-3.1.2.1/lib/parser/lexer.rb:24998 Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) # source://parser-3.1.2.1/lib/parser/lexer.rb:11249 Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:6 class Parser::Lexer::Literal # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:40 def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:114 def backslash_delimited?; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:37 def dedent_level; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:189 def end_interp_brace_and_try_closing; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:216 def extend_content; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:220 def extend_space(ts, te) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:195 def extend_string(string, ts, te) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:202 def flush_string; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:102 def heredoc?; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:37 def heredoc_e; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:166 def infer_indent_level(line) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:89 def interpolate?; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:122 def munge_escape?(character) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:132 def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:106 def plain_heredoc?; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:98 def regexp?; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:38 def saved_herebody_s; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:38 def saved_herebody_s=(_arg0) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:110 def squiggly_heredoc?; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:185 def start_interp_brace; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:37 def str_s; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:230 def supports_line_continuation_via_slash?; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:118 def type; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:93 def words?; end protected # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:248 def clear_buffer; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:244 def coerce_encoding(string) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:236 def delimiter?(delimiter) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:264 def emit(token, type, s, e) ; end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:259 def emit_start_tok; end end # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:7 Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) # source://parser-3.1.2.1/lib/parser/lexer/literal.rb:9 Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) # Mapping of strings to parser tokens. # # source://parser-3.1.2.1/lib/parser/lexer.rb:24965 Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) # source://parser-3.1.2.1/lib/parser/lexer.rb:24985 Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) # source://parser-3.1.2.1/lib/parser/lexer.rb:11134 Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:5 class Parser::Lexer::StackState # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:6 def initialize(name) ; end # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:34 def active?; end # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:11 def clear; end # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:38 def empty?; end # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:42 def inspect; end # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:29 def lexpop; end # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:22 def pop; end # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:15 def push(bit) ; end # source://parser-3.1.2.1/lib/parser/lexer/stack_state.rb:42 def to_s; end end # Diagnostic messages (errors, warnings and notices) that can be generated. # # @api public # @see Diagnostic # # source://parser-3.1.2.1/lib/parser/messages.rb:11 Parser::MESSAGES = T.let(T.unsafe(nil), Hash) # Holds p->max_numparam from parse.y # # @api private # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:8 class Parser::MaxNumparamStack # @api private # @return [MaxNumparamStack] a new instance of MaxNumparamStack # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:13 def initialize; end # @api private # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:17 def empty?; end # @api private # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:29 def has_numparams?; end # @api private # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:21 def has_ordinary_params!; end # @api private # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:25 def has_ordinary_params?; end # @api private # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:45 def pop; end # @api private # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:41 def push(static:) ; end # @api private # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:33 def register(numparam) ; end # @api private # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:9 def stack; end # @api private # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:37 def top; end private # @api private # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:51 def set(value) ; end end # @api private # # source://parser-3.1.2.1/lib/parser/max_numparam_stack.rb:11 Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) # @api private # # source://parser-3.1.2.1/lib/parser/messages.rb:105 module Parser::Messages class << self # Formats the message, returns a raw template if there's nothing to interpolate # # Code like `format("", {})` gives a warning, and so this method tries interpolating # only if `arguments` hash is not empty. # # @api private # # source://parser-3.1.2.1/lib/parser/messages.rb:112 def compile(reason, arguments) ; end end end # Parser metadata # # source://parser-3.1.2.1/lib/parser/meta.rb:5 module Parser::Meta ; end # All node types that parser can produce. Not all parser versions # will be able to produce every possible node. # # source://parser-3.1.2.1/lib/parser/meta.rb:9 Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) # {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. # It has a backwards compatible API and uses {Parser::Source::TreeRewriter} # instead of {Parser::Source::Rewriter}. # Please check the documentation for {Parser::Source::Rewriter} for details. # # @api public # @deprecated Use {Parser::TreeRewriter} # # source://parser-3.1.2.1/lib/parser/rewriter.rb:22 class Parser::Rewriter < ::Parser::AST::Processor extend ::Parser::Deprecation # @api public # @return [Rewriter] a new instance of Rewriter # # source://parser-3.1.2.1/lib/parser/rewriter.rb:98 def initialize(*_arg0) ; end # Returns `true` if the specified node is an assignment node, returns false # otherwise. # # @api public # @param node [Parser::AST::Node] # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/rewriter.rb:38 def assignment?(node) ; end # Inserts new code after the given source range. # # @api public # @param range [Parser::Source::Range] # @param content [String] # # source://parser-3.1.2.1/lib/parser/rewriter.rb:77 def insert_after(range, content) ; end # Inserts new code before the given source range. # # @api public # @param range [Parser::Source::Range] # @param content [String] # # source://parser-3.1.2.1/lib/parser/rewriter.rb:67 def insert_before(range, content) ; end # Removes the source range. # # @api public # @param range [Parser::Source::Range] # # source://parser-3.1.2.1/lib/parser/rewriter.rb:47 def remove(range) ; end # Replaces the code of the source range `range` with `content`. # # @api public # @param range [Parser::Source::Range] # @param content [String] # # source://parser-3.1.2.1/lib/parser/rewriter.rb:87 def replace(range, content) ; end # Rewrites the AST/source buffer and returns a String containing the new # version. # # @api public # @param source_buffer [Parser::Source::Buffer] # @param ast [Parser::AST::Node] # @return [String] # # source://parser-3.1.2.1/lib/parser/rewriter.rb:23 def rewrite(source_buffer, ast) ; end # Wraps the given source range with the given values. # # @api public # @param range [Parser::Source::Range] # @param content [String] # # source://parser-3.1.2.1/lib/parser/rewriter.rb:57 def wrap(range, before, after) ; end end # @api public # # source://parser-3.1.2.1/lib/parser/rewriter.rb:91 Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) # @api public # # source://parser-3.1.2.1/lib/parser.rb:30 module Parser::Source ; end # A buffer with source code. {Buffer} contains the source code itself, # associated location information (name and first line), and takes care # of encoding. # # A source buffer is immutable once populated. # # @api public # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:25 class Parser::Source::Buffer # @api public # @return [Buffer] a new instance of Buffer # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:105 def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)) ; end # Convert a character index into the source to a column number. # # @api private # @param position [Integer] # @return [Integer] column # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:233 def column_for_position(position) ; end # Convert a character index into the source to a `[line, column]` tuple. # # @api public # @param position [Integer] # @return [[Integer, Integer]] `[line, column]` # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:208 def decompose_position(position) ; end # First line of the buffer, 1 by default. # # @api public # @return [Integer] first line # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:26 def first_line; end # @api public # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:303 def freeze; end # @api public # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:309 def inspect; end # Number of last line in the buffer # # @api public # @return [Integer] # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:298 def last_line; end # Convert a character index into the source to a line number. # # @api private # @param position [Integer] # @return [Integer] line # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:222 def line_for_position(position) ; end # Extract line `lineno` as a new `Range`, taking `first_line` into account. # # @api public # @param lineno [Integer] # @raise [IndexError] if `lineno` is out of bounds # @return [Range] # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:275 def line_range(lineno) ; end # Buffer name. If the buffer was created from a file, the name corresponds # to relative path to the file. # # @api public # @return [String] buffer name # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:26 def name; end # Populate this buffer from a string without encoding autodetection. # # @api public # @param input [String] # @raise [ArgumentError] if already populated # @return [String] # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:180 def raw_source=(input) ; end # Populate this buffer from correspondingly named file. # # @api public # @example # Parser::Source::Buffer.new('foo/bar.rb').read # @raise [ArgumentError] if already populated # @return [Buffer] self # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:131 def read; end # @api public # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:194 def slice(range) ; end # Source code contained in this buffer. # # @api public # @raise [RuntimeError] if buffer is not populated yet # @return [String] source code # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:145 def source; end # Populate this buffer from a string with encoding autodetection. # `input` is mutated if not frozen. # # @api public # @param input [String] # @raise [ArgumentError] if already populated # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding # @return [String] # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:162 def source=(input) ; end # Extract line `lineno` from source, taking `first_line` into account. # # @api public # @param lineno [Integer] # @raise [IndexError] if `lineno` is out of bounds # @return [String] # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:264 def source_line(lineno) ; end # Return an `Array` of source code lines. # # @api public # @return [Array] # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:243 def source_lines; end # @api public # @return [Range] A range covering the whole source # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:289 def source_range; end private # @api public # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:339 def bsearch(line_begins, position) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:316 def line_begins; end # @api public # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:330 def line_index_for_position(position) ; end class << self # Try to recognize encoding of `string` as Ruby would, i.e. by looking for # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. # # @api public # @param string [String] # @return [String, nil] encoding name, if recognized # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:51 def recognize_encoding(string) ; end # Recognize encoding of `input` and process it so it could be lexed. # # * If `input` does not contain BOM or magic encoding comment, it is # kept in the original encoding. # * If the detected encoding is binary, `input` is kept in binary. # * Otherwise, `input` is re-encoded into UTF-8 and returned as a # new string. # # This method mutates the encoding of `input`, but not its content. # # @api public # @param input [String] # @raise [EncodingError] # @return [String] # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:90 def reencode_string(input) ; end end end # @api private # # source://parser-3.1.2.1/lib/parser/source/buffer.rb:31 Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) # A comment in the source code. # # @api public # # source://parser-3.1.2.1/lib/parser/source/comment.rb:17 class Parser::Source::Comment # @api public # @param range [Parser::Source::Range] # @return [Comment] a new instance of Comment # # source://parser-3.1.2.1/lib/parser/source/comment.rb:67 def initialize(range) ; end # Compares comments. Two comments are equal if they # correspond to the same source range. # # @api public # @param other [Object] # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/comment.rb:120 def ==(other) ; end # @api public # @return [Boolean] true if this is a block comment. # @see #type # # source://parser-3.1.2.1/lib/parser/source/comment.rb:109 def document?; end # @api public # @return [Boolean] true if this is an inline comment. # @see #type # # source://parser-3.1.2.1/lib/parser/source/comment.rb:101 def inline?; end # @api public # @return [String] a human-readable representation of this comment # # source://parser-3.1.2.1/lib/parser/source/comment.rb:128 def inspect; end # @api public # @return [Parser::Source::Range] # # source://parser-3.1.2.1/lib/parser/source/comment.rb:20 def loc; end # @api public # @return [Parser::Source::Range] # # source://parser-3.1.2.1/lib/parser/source/comment.rb:20 def location; end # @api public # @return [String] # # source://parser-3.1.2.1/lib/parser/source/comment.rb:18 def text; end # Type of this comment. # # * Inline comments correspond to `:inline`: # # # whatever # # * Block comments correspond to `:document`: # # =begin # hi i am a document # =end # # @api public # @return [Symbol] # # source://parser-3.1.2.1/lib/parser/source/comment.rb:89 def type; end class << self # Associate `comments` with `ast` nodes by their corresponding node. # # @api public # @deprecated Use {associate_locations}. # @param ast [Parser::AST::Node] # @param comments [Array] # @return [Hash>] # @see Parser::Source::Comment::Associator#associate # # source://parser-3.1.2.1/lib/parser/source/comment.rb:32 def associate(ast, comments) ; end # Associate `comments` with `ast` nodes using identity. # # @api public # @param ast [Parser::AST::Node] # @param comments [Array] # @return [Hash>] # @see Parser::Source::Comment::Associator#associate_by_identity # # source://parser-3.1.2.1/lib/parser/source/comment.rb:59 def associate_by_identity(ast, comments) ; end # Associate `comments` with `ast` nodes by their location in the # source. # # @api public # @param ast [Parser::AST::Node] # @param comments [Array] # @return [Hash>] # @see Parser::Source::Comment::Associator#associate_locations # # source://parser-3.1.2.1/lib/parser/source/comment.rb:46 def associate_locations(ast, comments) ; end end end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:45 class Parser::Source::Comment::Associator # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:51 def initialize(ast, comments) ; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:92 def associate; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:115 def associate_by_identity; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:103 def associate_locations; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:46 def skip_directives; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:46 def skip_directives=(_arg0) ; end private # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:182 def advance_comment; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:214 def advance_through_directives; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:206 def associate_and_advance_comment(node) ; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:123 def children_in_source_order(node) ; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:187 def current_comment_before?(node) ; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:194 def current_comment_before_end?(node) ; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:201 def current_comment_decorates?(node) ; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:135 def do_associate; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:166 def process_leading_comments(node) ; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:173 def process_trailing_comments(node) ; end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:148 def visit(node) ; end end # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:212 Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) # source://parser-3.1.2.1/lib/parser/source/comment/associator.rb:122 Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) # {Map} relates AST nodes to the source code they were parsed from. # More specifically, a {Map} or its subclass contains a set of ranges: # # * `expression`: smallest range which includes all source corresponding # to the node and all `expression` ranges of its children. # * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges # pointing to various interesting tokens corresponding to the node. # # Note that the {Map::Heredoc} map is the only one whose `expression` does # not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc # # => > # # The {file:doc/AST_FORMAT.md} document describes how ranges associated to source # code tokens. For example, the entry # # (array (int 1) (int 2)) # # "[1, 2]" # ^ begin # ^ end # ~~~~~~ expression # # means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, # then `node.loc` responds to `begin`, `end` and `expression`, and # `node.loc.begin` returns a range pointing at the opening bracket, and so on. # # If you want to write code polymorphic by the source map (i.e. accepting # several subclasses of {Map}), use `respond_to?` instead of `is_a?` to # check whether the map features the range you need. Concrete {Map} # subclasses may not be preserved between versions, but their interfaces # will be kept compatible. # # You can visualize the source maps with `ruby-parse -E` command-line tool. # # @api public # @example # require 'parser/current' # # p Parser::CurrentRuby.parse('[1, 2]').loc # # => #, # # @begin=#, # # @expression=#> # # source://parser-3.1.2.1/lib/parser/source/map.rb:70 class Parser::Source::Map # @api public # @param expression [Range] # @return [Map] a new instance of Map # # source://parser-3.1.2.1/lib/parser/source/map.rb:76 def initialize(expression) ; end # Compares source maps. # # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/map.rb:140 def ==(other) ; end # A shortcut for `self.expression.column`. # # @api public # @return [Integer] # # source://parser-3.1.2.1/lib/parser/source/map.rb:109 def column; end # @api public # @return [Range] # # source://parser-3.1.2.1/lib/parser/source/map.rb:72 def expression; end # A shortcut for `self.expression.line`. # # @api public # @return [Integer] # # source://parser-3.1.2.1/lib/parser/source/map.rb:99 def first_line; end # A shortcut for `self.expression.last_column`. # # @api public # @return [Integer] # # source://parser-3.1.2.1/lib/parser/source/map.rb:125 def last_column; end # A shortcut for `self.expression.last_line`. # # @api public # @return [Integer] # # source://parser-3.1.2.1/lib/parser/source/map.rb:117 def last_line; end # A shortcut for `self.expression.line`. # # @api public # @return [Integer] # # source://parser-3.1.2.1/lib/parser/source/map.rb:99 def line; end # The node that is described by this map. Nodes and maps have 1:1 correspondence. # # @api public # @return [Parser::AST::Node] # # source://parser-3.1.2.1/lib/parser/source/map.rb:71 def node; end # @api private # # source://parser-3.1.2.1/lib/parser/source/map.rb:89 def node=(node) ; end # Converts this source map to a hash with keys corresponding to # ranges. For example, if called on an instance of {Collection}, # which adds the `begin` and `end` ranges, the resulting hash # will contain keys `:expression`, `:begin` and `:end`. # # @api public # @example # require 'parser/current' # # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash # # => { # # :begin => #, # # :end => #, # # :expression => # # # } # @return [Hash] # # source://parser-3.1.2.1/lib/parser/source/map.rb:166 def to_hash; end # @api private # # source://parser-3.1.2.1/lib/parser/source/map.rb:132 def with_expression(expression_l) ; end protected # @api public # # source://parser-3.1.2.1/lib/parser/source/map.rb:180 def update_expression(expression_l) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/map.rb:176 def with(&block) ; end private # @api private # # source://parser-3.1.2.1/lib/parser/source/map.rb:82 def initialize_copy(other) ; end end # source://parser-3.1.2.1/lib/parser/source/map/collection.rb:6 class Parser::Source::Map::Collection < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/collection.rb:10 def initialize(begin_l, end_l, expression_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/collection.rb:7 def begin; end # source://parser-3.1.2.1/lib/parser/source/map/collection.rb:8 def end; end end # source://parser-3.1.2.1/lib/parser/source/map/condition.rb:6 class Parser::Source::Map::Condition < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/condition.rb:12 def initialize(keyword_l, begin_l, else_l, end_l, expression_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/condition.rb:8 def begin; end # source://parser-3.1.2.1/lib/parser/source/map/condition.rb:9 def else; end # source://parser-3.1.2.1/lib/parser/source/map/condition.rb:10 def end; end # source://parser-3.1.2.1/lib/parser/source/map/condition.rb:7 def keyword; end end # source://parser-3.1.2.1/lib/parser/source/map/constant.rb:6 class Parser::Source::Map::Constant < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/constant.rb:11 def initialize(double_colon, name, expression) ; end # source://parser-3.1.2.1/lib/parser/source/map/constant.rb:7 def double_colon; end # source://parser-3.1.2.1/lib/parser/source/map/constant.rb:8 def name; end # source://parser-3.1.2.1/lib/parser/source/map/constant.rb:9 def operator; end # source://parser-3.1.2.1/lib/parser/source/map/constant.rb:20 def with_operator(operator_l) ; end protected # source://parser-3.1.2.1/lib/parser/source/map/constant.rb:26 def update_operator(operator_l) ; end end # source://parser-3.1.2.1/lib/parser/source/map/definition.rb:6 class Parser::Source::Map::Definition < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/definition.rb:12 def initialize(keyword_l, operator_l, name_l, end_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/definition.rb:10 def end; end # source://parser-3.1.2.1/lib/parser/source/map/definition.rb:7 def keyword; end # source://parser-3.1.2.1/lib/parser/source/map/definition.rb:9 def name; end # source://parser-3.1.2.1/lib/parser/source/map/definition.rb:8 def operator; end end # source://parser-3.1.2.1/lib/parser/source/map/for.rb:6 class Parser::Source::Map::For < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/for.rb:10 def initialize(keyword_l, in_l, begin_l, end_l, expression_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/for.rb:8 def begin; end # source://parser-3.1.2.1/lib/parser/source/map/for.rb:8 def end; end # source://parser-3.1.2.1/lib/parser/source/map/for.rb:7 def in; end # source://parser-3.1.2.1/lib/parser/source/map/for.rb:7 def keyword; end end # source://parser-3.1.2.1/lib/parser/source/map/heredoc.rb:6 class Parser::Source::Map::Heredoc < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/heredoc.rb:10 def initialize(begin_l, body_l, end_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/heredoc.rb:7 def heredoc_body; end # source://parser-3.1.2.1/lib/parser/source/map/heredoc.rb:8 def heredoc_end; end end # source://parser-3.1.2.1/lib/parser/source/map/index.rb:6 class Parser::Source::Map::Index < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/index.rb:11 def initialize(begin_l, end_l, expression_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/index.rb:7 def begin; end # source://parser-3.1.2.1/lib/parser/source/map/index.rb:8 def end; end # source://parser-3.1.2.1/lib/parser/source/map/index.rb:9 def operator; end # source://parser-3.1.2.1/lib/parser/source/map/index.rb:21 def with_operator(operator_l) ; end protected # source://parser-3.1.2.1/lib/parser/source/map/index.rb:27 def update_operator(operator_l) ; end end # source://parser-3.1.2.1/lib/parser/source/map/keyword.rb:6 class Parser::Source::Map::Keyword < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/keyword.rb:11 def initialize(keyword_l, begin_l, end_l, expression_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/keyword.rb:8 def begin; end # source://parser-3.1.2.1/lib/parser/source/map/keyword.rb:9 def end; end # source://parser-3.1.2.1/lib/parser/source/map/keyword.rb:7 def keyword; end end # source://parser-3.1.2.1/lib/parser/source/map/method_definition.rb:6 class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/method_definition.rb:13 def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/method_definition.rb:11 def assignment; end # source://parser-3.1.2.1/lib/parser/source/map/method_definition.rb:10 def end; end # source://parser-3.1.2.1/lib/parser/source/map/method_definition.rb:7 def keyword; end # source://parser-3.1.2.1/lib/parser/source/map/method_definition.rb:9 def name; end # source://parser-3.1.2.1/lib/parser/source/map/method_definition.rb:8 def operator; end end # source://parser-3.1.2.1/lib/parser/source/map/objc_kwarg.rb:6 class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/objc_kwarg.rb:11 def initialize(keyword_l, operator_l, argument_l, expression_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/objc_kwarg.rb:9 def argument; end # source://parser-3.1.2.1/lib/parser/source/map/objc_kwarg.rb:7 def keyword; end # source://parser-3.1.2.1/lib/parser/source/map/objc_kwarg.rb:8 def operator; end end # source://parser-3.1.2.1/lib/parser/source/map/operator.rb:6 class Parser::Source::Map::Operator < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/operator.rb:9 def initialize(operator, expression) ; end # source://parser-3.1.2.1/lib/parser/source/map/operator.rb:7 def operator; end end # source://parser-3.1.2.1/lib/parser/source/map/rescue_body.rb:6 class Parser::Source::Map::RescueBody < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/rescue_body.rb:11 def initialize(keyword_l, assoc_l, begin_l, expression_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/rescue_body.rb:8 def assoc; end # source://parser-3.1.2.1/lib/parser/source/map/rescue_body.rb:9 def begin; end # source://parser-3.1.2.1/lib/parser/source/map/rescue_body.rb:7 def keyword; end end # source://parser-3.1.2.1/lib/parser/source/map/send.rb:6 class Parser::Source::Map::Send < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/send.rb:13 def initialize(dot_l, selector_l, begin_l, end_l, expression_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/send.rb:10 def begin; end # source://parser-3.1.2.1/lib/parser/source/map/send.rb:7 def dot; end # source://parser-3.1.2.1/lib/parser/source/map/send.rb:11 def end; end # source://parser-3.1.2.1/lib/parser/source/map/send.rb:9 def operator; end # source://parser-3.1.2.1/lib/parser/source/map/send.rb:8 def selector; end # source://parser-3.1.2.1/lib/parser/source/map/send.rb:24 def with_operator(operator_l) ; end protected # source://parser-3.1.2.1/lib/parser/source/map/send.rb:30 def update_operator(operator_l) ; end end # source://parser-3.1.2.1/lib/parser/source/map/ternary.rb:6 class Parser::Source::Map::Ternary < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/ternary.rb:10 def initialize(question_l, colon_l, expression_l) ; end # source://parser-3.1.2.1/lib/parser/source/map/ternary.rb:8 def colon; end # source://parser-3.1.2.1/lib/parser/source/map/ternary.rb:7 def question; end end # source://parser-3.1.2.1/lib/parser/source/map/variable.rb:6 class Parser::Source::Map::Variable < ::Parser::Source::Map # source://parser-3.1.2.1/lib/parser/source/map/variable.rb:10 def initialize(name_l, expression_l = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/source/map/variable.rb:7 def name; end # source://parser-3.1.2.1/lib/parser/source/map/variable.rb:8 def operator; end # source://parser-3.1.2.1/lib/parser/source/map/variable.rb:19 def with_operator(operator_l) ; end protected # source://parser-3.1.2.1/lib/parser/source/map/variable.rb:25 def update_operator(operator_l) ; end end # A range of characters in a particular source buffer. # # The range is always exclusive, i.e. a range with `begin_pos` of 3 and # `end_pos` of 5 will contain the following characters: # # example # ^^ # # @api public # # source://parser-3.1.2.1/lib/parser/source/range.rb:26 class Parser::Source::Range include ::Comparable # @api public # @param source_buffer [Buffer] # @param begin_pos [Integer] # @param end_pos [Integer] # @return [Range] a new instance of Range # # source://parser-3.1.2.1/lib/parser/source/range.rb:37 def initialize(source_buffer, begin_pos, end_pos) ; end # Compare ranges, first by begin_pos, then by end_pos. # # @api public # # source://parser-3.1.2.1/lib/parser/source/range.rb:301 def <=>(other) ; end # by the given amount(s) # # @api public # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos # @return [Range] the same range as this range but with the given end point(s) adjusted # # source://parser-3.1.2.1/lib/parser/source/range.rb:193 def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)) ; end # @api public # @return [Range] a zero-length range located just before the beginning # of this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:55 def begin; end # @api public # @return [Integer] index of the first character in the range # # source://parser-3.1.2.1/lib/parser/source/range.rb:30 def begin_pos; end # @api public # @return [Integer] zero-based column number of the beginning of this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:92 def column; end # @api public # @raise RangeError # @return [::Range] a range of columns spanned by this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:114 def column_range; end # Return `other.contains?(self)` # # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? # # @api public # @param other [Range] # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/range.rb:274 def contained?(other) ; end # Returns true iff this range contains (strictly) `other`. # # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? # # @api public # @param other [Range] # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/range.rb:262 def contains?(other) ; end # Returns true iff both ranges intersect and also have different elements from one another. # # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? # # @api public # @param other [Range] # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/range.rb:286 def crossing?(other) ; end # Return `true` iff this range and `other` are disjoint. # # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? # # @api public # @param other [Range] # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/range.rb:236 def disjoint?(other) ; end # Checks if a range is empty; if it contains no characters # # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/range.rb:294 def empty?; end # @api public # @return [Range] a zero-length range located just after the end # of this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:63 def end; end # @api public # @return [Integer] index of the character after the last character in the range # # source://parser-3.1.2.1/lib/parser/source/range.rb:30 def end_pos; end # @api public def eql?(_arg0) ; end # Line number of the beginning of this range. By default, the first line # of a buffer is 1; as such, line numbers are most commonly one-based. # # @api public # @return [Integer] line number of the beginning of this range. # @see Buffer # # source://parser-3.1.2.1/lib/parser/source/range.rb:83 def first_line; end # Support for Ranges be used in as Hash indices and in Sets. # # @api public # # source://parser-3.1.2.1/lib/parser/source/range.rb:313 def hash; end # @api public # @return [String] a human-readable representation of this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:320 def inspect; end # @api public # @param other [Range] # @return [Range] overlapping region of this range and `other`, or `nil` # if they do not overlap # # source://parser-3.1.2.1/lib/parser/source/range.rb:220 def intersect(other) ; end # `is?` provides a concise way to compare the source corresponding to this range. # For example, `r.source == '(' || r.source == 'begin'` is equivalent to # `r.is?('(', 'begin')`. # # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/range.rb:141 def is?(*what) ; end # @api public # @param other [Range] # @return [Range] smallest possible range spanning both this range and `other`. # # source://parser-3.1.2.1/lib/parser/source/range.rb:209 def join(other) ; end # @api public # @return [Integer] zero-based column number of the end of this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:106 def last_column; end # @api public # @return [Integer] line number of the end of this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:99 def last_line; end # @api public # @return [Integer] amount of characters included in this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:70 def length; end # Line number of the beginning of this range. By default, the first line # of a buffer is 1; as such, line numbers are most commonly one-based. # # @api public # @return [Integer] line number of the beginning of this range. # @see Buffer # # source://parser-3.1.2.1/lib/parser/source/range.rb:83 def line; end # Return `true` iff this range is not disjoint from `other`. # # @api public # @param other [Range] # @return [Boolean] `true` if this range and `other` overlap # # source://parser-3.1.2.1/lib/parser/source/range.rb:250 def overlaps?(other) ; end # @api public # @param new_size [Integer] # @return [Range] a range beginning at the same point as this range and length `new_size`. # # source://parser-3.1.2.1/lib/parser/source/range.rb:201 def resize(new_size) ; end # @api public # @return [Integer] amount of characters included in this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:70 def size; end # @api public # @return [String] all source code covered by this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:132 def source; end # @api public # @return [Parser::Source::Buffer] # # source://parser-3.1.2.1/lib/parser/source/range.rb:29 def source_buffer; end # @api public # @return [String] a line of source code containing the beginning of this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:125 def source_line; end # @api public # @return [Array] a set of character indexes contained in this range. # # source://parser-3.1.2.1/lib/parser/source/range.rb:148 def to_a; end # @api public # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` # # source://parser-3.1.2.1/lib/parser/source/range.rb:155 def to_range; end # Composes a GNU/Clang-style string representation of the beginning of this # range. # # For example, for the following range in file `foo.rb`, # # def foo # ^^^ # # `to_s` will return `foo.rb:1:5`. # Note that the column index is one-based. # # @api public # @return [String] # # source://parser-3.1.2.1/lib/parser/source/range.rb:173 def to_s; end # to the given value(s). # # @api public # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos # @return [Range] the same range as this range but with the given end point(s) changed # # source://parser-3.1.2.1/lib/parser/source/range.rb:184 def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)) ; end end # {Rewriter} is deprecated. Use {TreeRewriter} instead. # # TreeRewriter has simplified semantics, and customizable policies # with regards to clobbering. Please read the documentation. # # Keep in mind: # - Rewriter was discarding the `end_pos` of the given range for `insert_before`, # and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. # - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while # Rewriter would raise clobbering errors if the non '_multi' version was called. # - The TreeRewriter policy closest to Rewriter's behavior is: # different_replacements: :raise, # swallowed_insertions: :raise, # crossing_deletions: :accept # # @api public # @deprecated Use {TreeRewriter} # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:31 class Parser::Source::Rewriter extend ::Parser::Deprecation # @api public # @deprecated Use {TreeRewriter} # @param source_buffer [Source::Buffer] # @return [Rewriter] a new instance of Rewriter # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:39 def initialize(source_buffer) ; end # @api public # @return [Diagnostic::Engine] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:33 def diagnostics; end # Inserts new code after the given source range. # # @api public # @deprecated Use {TreeRewriter#insert_after} # @param range [Range] # @param content [String] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:131 def insert_after(range, content) ; end # Inserts new code after the given source range by allowing other # insertions at the same position. # Note that an insertion with latter invocation comes _after_ earlier # insertion at the same position in the rewritten source. # # @api public # @deprecated Use {TreeRewriter#insert_after} # @example Inserting ')]' # rewriter. # insert_after_multi(range, ')'). # insert_after_multi(range, ']'). # process # @param range [Range] # @param content [String] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:153 def insert_after_multi(range, content) ; end # Inserts new code before the given source range. # # @api public # @deprecated Use {TreeRewriter#insert_before} # @param range [Range] # @param content [String] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:80 def insert_before(range, content) ; end # Inserts new code before the given source range by allowing other # insertions at the same position. # Note that an insertion with latter invocation comes _before_ earlier # insertion at the same position in the rewritten source. # # @api public # @deprecated Use {TreeRewriter#insert_before} # @example Inserting '[(' # rewriter. # insert_before_multi(range, '('). # insert_before_multi(range, '['). # process # @param range [Range] # @param content [String] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:117 def insert_before_multi(range, content) ; end # Applies all scheduled changes to the `source_buffer` and returns # modified source as a new string. # # @api public # @deprecated Use {TreeRewriter#process} # @return [String] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:178 def process; end # Removes the source range. # # @api public # @deprecated Use {TreeRewriter#remove} # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:67 def remove(range) ; end # Replaces the code of the source range `range` with `content`. # # @api public # @deprecated Use {TreeRewriter#replace} # @param range [Range] # @param content [String] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:167 def replace(range, content) ; end # @api public # @return [Source::Buffer] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:32 def source_buffer; end # Provides a protected block where a sequence of multiple rewrite actions # are handled atomically. If any of the actions failed by clobbering, # all the actions are rolled back. # # @api public # @deprecated Use {TreeRewriter#transaction} # @example # begin # rewriter.transaction do # rewriter.insert_before(range_of_something, '(') # rewriter.insert_after(range_of_something, ')') # end # rescue Parser::ClobberingError # end # @raise [RuntimeError] when no block is passed # @raise [RuntimeError] when already in a transaction # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:216 def transaction; end # Inserts new code before and after the given source range. # # @api public # @deprecated Use {TreeRewriter#wrap} # @param range [Range] # @param before [String] # @param after [String] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:94 def wrap(range, before, after) ; end private # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:476 def active_clobber; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:484 def active_clobber=(value) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:480 def active_insertions; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:492 def active_insertions=(value) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:472 def active_queue; end # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:500 def adjacent?(range1, range2) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:351 def adjacent_insertion_mask(range) ; end # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:366 def adjacent_insertions?(range) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:347 def adjacent_position_mask(range) ; end # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:377 def adjacent_updates?(range) ; end # Schedule a code update. If it overlaps with another update, check # whether they conflict, and raise a clobbering error if they do. # (As a special case, zero-length ranges at the same position are # considered to "overlap".) Otherwise, merge them. # # Updates which are adjacent to each other, but do not overlap, are also # merged. # # RULES: # # - Insertion ("replacing" a zero-length range): # - Two insertions at the same point conflict. This is true even # if the earlier insertion has already been merged with an adjacent # update, and even if they are both inserting the same text. # - An insertion never conflicts with a replace or remove operation # on its right or left side, which does not overlap it (in other # words, which does not update BOTH its right and left sides). # - An insertion always conflicts with a remove operation which spans # both its sides. # - An insertion conflicts with a replace operation which spans both its # sides, unless the replacement text is longer than the replaced text # by the size of the insertion (or more), and the portion of # replacement text immediately after the insertion position is # identical to the inserted text. # # - Removal operations never conflict with each other. # # - Replacement operations: # - Take the portion of each replacement text which falls within: # - The other operation's replaced region # - The other operation's replacement text, if it extends past the # end of its own replaced region (in other words, if the replacement # text is longer than the text it replaces) # - If and only if the taken texts are identical for both operations, # they do not conflict. # # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:280 def append(action) ; end # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:389 def can_merge?(action, existing) ; end # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:355 def clobbered_insertion?(insertion) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:343 def clobbered_position_mask(range) ; end # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:468 def in_transaction?; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:410 def merge_actions(action, existing) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:419 def merge_actions!(action, existing) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:425 def merge_replacements(actions) ; end # @api public # @raise [ClobberingError] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:450 def raise_clobber_error(action, existing) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:335 def record_insertion(range) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:339 def record_replace(range) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:445 def replace_actions(old, updated) ; end # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:383 def replace_compatible_with_insertion?(replace, insertion) ; end end # source://parser-3.1.2.1/lib/parser/source/rewriter/action.rb:9 class Parser::Source::Rewriter::Action include ::Comparable # source://parser-3.1.2.1/lib/parser/source/rewriter/action.rb:15 def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/source/rewriter/action.rb:24 def <=>(other) ; end # source://parser-3.1.2.1/lib/parser/source/rewriter/action.rb:12 def allow_multiple_insertions; end # source://parser-3.1.2.1/lib/parser/source/rewriter/action.rb:12 def allow_multiple_insertions?; end # source://parser-3.1.2.1/lib/parser/source/rewriter/action.rb:12 def order; end # source://parser-3.1.2.1/lib/parser/source/rewriter/action.rb:12 def range; end # source://parser-3.1.2.1/lib/parser/source/rewriter/action.rb:12 def replacement; end # source://parser-3.1.2.1/lib/parser/source/rewriter/action.rb:30 def to_s; end end # @api public # # source://parser-3.1.2.1/lib/parser/source/rewriter.rb:504 Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) # {TreeRewriter} performs the heavy lifting in the source rewriting process. # It schedules code updates to be performed in the correct order. # # For simple cases, the resulting source will be obvious. # # Examples for more complex cases follow. Assume these examples are acting on # the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. # receive a Range as first argument; for clarity, examples below use english # sentences and a string of raw code instead. # # ## Overlapping ranges: # # Any two rewriting actions on overlapping ranges will fail and raise # a `ClobberingError`, unless they are both deletions (covered next). # # * wrap ':hello, ' with '(' and ')' # * wrap ', :world' with '(' and ')' # => CloberringError # # ## Overlapping deletions: # # * remove ':hello, ' # * remove ', :world' # # The overlapping ranges are merged and `':hello, :world'` will be removed. # This policy can be changed. `:crossing_deletions` defaults to `:accept` # but can be set to `:warn` or `:raise`. # # ## Multiple actions at the same end points: # # Results will always be independent on the order they were given. # Exception: rewriting actions done on exactly the same range (covered next). # # Example: # * replace ', ' by ' => ' # * wrap ':hello, :world' with '{' and '}' # * replace ':world' with ':everybody' # * wrap ':world' with '[', ']' # # The resulting string will be `'puts({:hello => [:everybody]})'` # and this result is independent on the order the instructions were given in. # # Note that if the two "replace" were given as a single replacement of ', :world' # for ' => :everybody', the result would be a `ClobberingError` because of the wrap # in square brackets. # # ## Multiple wraps on same range: # * wrap ':hello' with '(' and ')' # * wrap ':hello' with '[' and ']' # # The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. # # ## Multiple replacements on same range: # * replace ':hello' by ':hi', then # * replace ':hello' by ':hey' # # The replacements are made in the order given, so the latter replacement # supersedes the former and ':hello' will be replaced by ':hey'. # # This policy can be changed. `:different_replacements` defaults to `:accept` # but can be set to `:warn` or `:raise`. # # ## Swallowed insertions: # wrap 'world' by '__', '__' # replace ':hello, :world' with ':hi' # # A containing replacement will swallow the contained rewriting actions # and `':hello, :world'` will be replaced by `':hi'`. # # This policy can be changed for swallowed insertions. `:swallowed_insertions` # defaults to `:accept` but can be set to `:warn` or `:raise` # # ## Implementation # The updates are organized in a tree, according to the ranges they act on # (where children are strictly contained by their parent), hence the name. # # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:91 class Parser::Source::TreeRewriter extend ::Parser::Deprecation # @api public # @param source_buffer [Source::Buffer] # @return [TreeRewriter] a new instance of TreeRewriter # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:98 def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)) ; end # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. # # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], # [:wrap, 2...6, '', '!'], # aka "insert_after" # [:replace, 2...4, 'foo'], # [:replace, 5...6, ''], # aka "removal" # ], # # Contrary to `as_replacements`, this representation is sufficient to recreate exactly # the rewriter. # # @api public # @return [Array<(Symbol, Range, String{, String})>] # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:299 def as_nested_actions; end # Returns a representation of the rewriter as an ordered list of replacements. # # rewriter.as_replacements # => [ [1...1, '('], # [2...4, 'foo'], # [5...6, ''], # [6...6, '!'], # [10...10, ')'], # ] # # This representation is sufficient to recreate the result of `process` but it is # not sufficient to recreate completely the rewriter for further merging/actions. # See `as_nested_actions` # # @api public # @return [Array] an ordered list of pairs of range & replacement # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:281 def as_replacements; end # @api public # @return [Diagnostic::Engine] # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:93 def diagnostics; end # Returns true iff no (non trivial) update has been recorded # # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:125 def empty?; end # For special cases where one needs to merge a rewriter attached to a different source_buffer # or that needs to be offset. Policies of the receiver are used. # # @api public # @param rewriter [TreeRewriter] from different source_buffer # @param offset [Integer] # @raise [IndexError] if action ranges (once offset) don't fit the current buffer # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:168 def import!(foreign_rewriter, offset: T.unsafe(nil)) ; end # @api public # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:329 def in_transaction?; end # Shortcut for `wrap(range, nil, content)` # # @api public # @param range [Range] # @param content [String] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:242 def insert_after(range, content) ; end # @api private # @deprecated Use insert_after or wrap # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:351 def insert_after_multi(range, text) ; end # Shortcut for `wrap(range, content, nil)` # # @api public # @param range [Range] # @param content [String] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:230 def insert_before(range, content) ; end # @api private # @deprecated Use insert_after or wrap # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:342 def insert_before_multi(range, text) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:334 def inspect; end # Returns a new rewriter that consists of the updates of the received # and the given argument. Policies of the receiver are used. # # @api public # @param with [Rewriter] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] merge of receiver and argument # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:155 def merge(with) ; end # Merges the updates of argument with the receiver. # Policies of the receiver are used. # This action is atomic in that it won't change the receiver # unless it succeeds. # # @api public # @param with [Rewriter] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:139 def merge!(with) ; end # Applies all scheduled changes to the `source_buffer` and returns # modified source as a new string. # # @api public # @return [String] # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:252 def process; end # Shortcut for `replace(range, '')` # # @api public # @param range [Range] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:217 def remove(range) ; end # Replaces the code of the source range `range` with `content`. # # @api public # @param range [Range] # @param content [String] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:193 def replace(range, content) ; end # @api public # @return [Source::Buffer] # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:92 def source_buffer; end # Provides a protected block where a sequence of multiple rewrite actions # are handled atomically. If any of the actions failed by clobbering, # all the actions are rolled back. Transactions can be nested. # # @api public # @raise [RuntimeError] when no block is passed # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:310 def transaction; end # Inserts the given strings before and after the given range. # # @api public # @param range [Range] # @param insert_before [String, nil] # @param insert_after [String, nil] # @raise [ClobberingError] when clobbering is detected # @return [Rewriter] self # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:206 def wrap(range, insert_before, insert_after) ; end protected # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:365 def action_root; end private # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:369 def action_summary; end # @api public # @raise [ArgumentError] # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:392 def check_policy_validity; end # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:404 def check_range_validity(range) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:397 def combine(range, attributes) ; end # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:411 def enforce_policy(event) ; end # @api public # @raise [Parser::ClobberingError] # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:418 def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments) ; end end # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:391 Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:13 class Parser::Source::TreeRewriter::Action # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:16 def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:28 def combine(action) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:67 def contract; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:33 def empty?; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:14 def insert_after; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:14 def insert_before; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:57 def insertion?; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:80 def moved(source_buffer, offset) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:49 def nested_actions; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:40 def ordered_replacements; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:14 def range; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:14 def replacement; end protected # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:158 def analyse_hierarchy(action) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:145 def bsearch_child_index(from = T.unsafe(nil)) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:224 def call_enforcer_for_merge(action) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:204 def check_fusible(action, *fusible) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:94 def children; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:129 def combine_children(more_children) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:102 def do_combine(action) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:135 def fuse_deletions(action, fusible, other_sibblings) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:215 def merge(action) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:110 def place_in_hierarchy(action) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:232 def swallow(children) ; end # source://parser-3.1.2.1/lib/parser/source/tree_rewriter/action.rb:96 def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)) ; end end # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:356 Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) # @api public # # source://parser-3.1.2.1/lib/parser/source/tree_rewriter.rb:417 Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) # source://parser-3.1.2.1/lib/parser/static_environment.rb:5 class Parser::StaticEnvironment # @return [StaticEnvironment] a new instance of StaticEnvironment # # source://parser-3.1.2.1/lib/parser/static_environment.rb:9 def initialize; end # source://parser-3.1.2.1/lib/parser/static_environment.rb:38 def declare(name) ; end # source://parser-3.1.2.1/lib/parser/static_environment.rb:56 def declare_anonymous_blockarg; end # source://parser-3.1.2.1/lib/parser/static_environment.rb:48 def declare_forward_args; end # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/static_environment.rb:44 def declared?(name) ; end # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/static_environment.rb:60 def declared_anonymous_blockarg?; end # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/static_environment.rb:52 def declared_forward_args?; end # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/static_environment.rb:64 def empty?; end # source://parser-3.1.2.1/lib/parser/static_environment.rb:25 def extend_dynamic; end # source://parser-3.1.2.1/lib/parser/static_environment.rb:18 def extend_static; end # source://parser-3.1.2.1/lib/parser/static_environment.rb:13 def reset; end # source://parser-3.1.2.1/lib/parser/static_environment.rb:32 def unextend; end end # source://parser-3.1.2.1/lib/parser/static_environment.rb:7 Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) # source://parser-3.1.2.1/lib/parser/static_environment.rb:6 Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) # {Parser::SyntaxError} is raised whenever parser detects a syntax error, # similar to the standard SyntaxError class. # # @api public # # source://parser-3.1.2.1/lib/parser/syntax_error.rb:13 class Parser::SyntaxError < ::StandardError # @api public # @return [SyntaxError] a new instance of SyntaxError # # source://parser-3.1.2.1/lib/parser/syntax_error.rb:16 def initialize(diagnostic) ; end # @api public # @return [Parser::Diagnostic] # # source://parser-3.1.2.1/lib/parser/syntax_error.rb:14 def diagnostic; end end # {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite # existing ASTs. It's built on top of {Parser::AST::Processor} and # {Parser::Source::TreeRewriter} # # For example, assume you want to remove `do` tokens from a while statement. # You can do this as following: # # require 'parser/current' # # class RemoveDo < Parser::TreeRewriter # def on_while(node) # # Check if the statement starts with "do" # if node.location.begin.is?('do') # remove(node.location.begin) # end # end # end # # code = <<-EOF # while true do # puts 'hello' # end # EOF # # ast = Parser::CurrentRuby.parse code # buffer = Parser::Source::Buffer.new('(example)', source: code) # rewriter = RemoveDo.new # # # Rewrite the AST, returns a String with the new form. # puts rewriter.rewrite(buffer, ast) # # This would result in the following Ruby code: # # while true # puts 'hello' # end # # Keep in mind that {Parser::TreeRewriter} does not take care of indentation when # inserting/replacing code so you'll have to do this yourself. # # See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) # describing rewriters in greater detail. # # @api public # # source://parser-3.1.2.1/lib/parser/tree_rewriter.rb:61 class Parser::TreeRewriter < ::Parser::AST::Processor # Returns `true` if the specified node is an assignment node, returns false # otherwise. # # @api public # @param node [Parser::AST::Node] # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/tree_rewriter.rb:79 def assignment?(node) ; end # Inserts new code after the given source range. # # @api public # @param range [Parser::Source::Range] # @param content [String] # # source://parser-3.1.2.1/lib/parser/tree_rewriter.rb:118 def insert_after(range, content) ; end # Inserts new code before the given source range. # # @api public # @param range [Parser::Source::Range] # @param content [String] # # source://parser-3.1.2.1/lib/parser/tree_rewriter.rb:108 def insert_before(range, content) ; end # Removes the source range. # # @api public # @param range [Parser::Source::Range] # # source://parser-3.1.2.1/lib/parser/tree_rewriter.rb:88 def remove(range) ; end # Replaces the code of the source range `range` with `content`. # # @api public # @param range [Parser::Source::Range] # @param content [String] # # source://parser-3.1.2.1/lib/parser/tree_rewriter.rb:128 def replace(range, content) ; end # Rewrites the AST/source buffer and returns a String containing the new # version. # # @api public # @param source_buffer [Parser::Source::Buffer] # @param ast [Parser::AST::Node] # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: # policy arguments for TreeRewriter (optional) # @return [String] # # source://parser-3.1.2.1/lib/parser/tree_rewriter.rb:62 def rewrite(source_buffer, ast, **policy) ; end # Wraps the given source range with the given values. # # @api public # @param range [Parser::Source::Range] # @param content [String] # # source://parser-3.1.2.1/lib/parser/tree_rewriter.rb:98 def wrap(range, before, after) ; end end # source://parser-3.1.2.1/lib/parser/version.rb:4 Parser::VERSION = T.let(T.unsafe(nil), String) # source://parser-3.1.2.1/lib/parser/variables_stack.rb:5 class Parser::VariablesStack # @return [VariablesStack] a new instance of VariablesStack # # source://parser-3.1.2.1/lib/parser/variables_stack.rb:6 def initialize; end # source://parser-3.1.2.1/lib/parser/variables_stack.rb:27 def declare(name) ; end # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/variables_stack.rb:31 def declared?(name) ; end # @return [Boolean] # # source://parser-3.1.2.1/lib/parser/variables_stack.rb:11 def empty?; end # source://parser-3.1.2.1/lib/parser/variables_stack.rb:19 def pop; end # source://parser-3.1.2.1/lib/parser/variables_stack.rb:15 def push; end # source://parser-3.1.2.1/lib/parser/variables_stack.rb:23 def reset; end end