Class: RubyParser::Parser

Inherits:
Racc::Parser
  • Object
show all
Includes:
RubyParserStuff
Defined in:
lib/ruby_parser.rb

Constant Summary

Constants included from RubyParserStuff

RubyParserStuff::ENCODING_ORDER, RubyParserStuff::VERSION

Instance Attribute Summary

Attributes included from RubyParserStuff

#canonicalize_conditions, #comments, #env, #file, #in_def, #in_kwarg, #in_single, #lexer

Class Method Summary collapse

Methods included from RubyParserStuff

#arg_blk_pass, #arg_concat, #argl, #args, #array_to_hash, #aryset, #assignable, #backref_assign_error, #block_append, #block_dup_check, #block_var, #call_args, #clean_mlhs, #cond, #debug20, deprecate, #do_parse, #gettable, #hack_encoding, #handle_encoding, #initialize, #invert_block_call, #inverted?, #list_append, #list_prepend, #literal_concat, #logical_op, #new_aref, #new_assign, #new_attrasgn, #new_body, #new_brace_body, #new_call, #new_case, #new_class, #new_compstmt, #new_defn, #new_defs, #new_do_body, #new_for, #new_hash, #new_if, #new_iter, #new_masgn, #new_masgn_arg, #new_match, #new_module, #new_op_asgn, #new_op_asgn2, #new_qsym_list, #new_qsym_list_entry, #new_qword_list, #new_qword_list_entry, #new_regexp, #new_resbody, #new_rescue, #new_sclass, #new_string, #new_super, #new_symbol_list, #new_symbol_list_entry, #new_undef, #new_until, #new_until_or_while, #new_when, #new_while, #new_word_list, #new_word_list_entry, #new_xstring, #new_yield, #next_token, #on_error, #process, #remove_begin, #reset, #ret_args, #s, #syntax_error, #value_expr, #void_stmts, #warning

Class Method Details

.inherited(x) ⇒ Object



15
16
17
# File 'lib/ruby_parser.rb', line 15

def self.inherited x
  RubyParser::VERSIONS << x
end

.versionObject



23
24
25
# File 'lib/ruby_parser.rb', line 23

def self.version
  @version ||= Parser > self && self.name[/(?:V|Ruby)(\d+)/, 1].to_i
end

.version=(v) ⇒ Object



19
20
21
# File 'lib/ruby_parser.rb', line 19

def self.version= v
   @version = v
end