Class: RubyParser::Parser

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

Constant Summary

Constants included from RubyParserStuff

RubyParserStuff::ARG_TYPES, RubyParserStuff::ENCODING_ORDER, RubyParserStuff::JUMP_TYPE, RubyParserStuff::TAB_WIDTH, 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

#_racc_do_reduce, #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, #dedent, #dedent_size, #dedent_string, 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_const_op_asgn, #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_asgn1, #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, #void_stmts, #warning, #whitespace_width

Class Method Details

.inherited(x) ⇒ Object



53
54
55
# File 'lib/ruby_parser.rb', line 53

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

.versionObject



61
62
63
# File 'lib/ruby_parser.rb', line 61

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

.version=(v) ⇒ Object



57
58
59
# File 'lib/ruby_parser.rb', line 57

def self.version= v
   @version = v
end