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::KEEP_COMMENT_TOKENS, RubyParserStuff::TAB_WIDTH, RubyParserStuff::VERSION

Instance Attribute Summary

Attributes included from RubyParserStuff

#canonicalize_conditions, #env, #file, #in_argdef, #in_def, #in_kwarg, #in_single, #last_token_type, #lexer

Class Method Summary collapse

Methods included from RubyParserStuff

#_racc_do_reduce, #arg_concat, #argl, #args, #array_pat_concat, #array_to_hash, #ary_to_pat, #aryset, #assignable, #attrset_id?, #backref_assign_error, #block_append, #block_dup_check, #block_var, #call_args, #clean_mlhs, #cond, #debug, #debug20, #dedent, #dedent_size, #dedent_string, deprecate, #do_parse, #end_args, #endless_method_name, #gettable, #hack_encoding, #handle_encoding, #initialize, #invert_block_call, #inverted?, #list_append, #list_prepend, #literal_concat, #local_pop, #logical_op, #new_aref, #new_arg, #new_array_pattern, #new_array_pattern_tail, #new_assign, #new_attrasgn, #new_begin, #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_endless_defn, #new_endless_defs, #new_find_pattern, #new_find_pattern_tail, #new_for, #new_hash, #new_hash_pattern, #new_hash_pattern_tail, #new_if, #new_in, #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, #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, #pop_pktbl, #pop_pvtbl, #prev_value_to_lineno, #process, #push_pktbl, #push_pvtbl, #remove_begin, #reset, #ret_args, #s, #syntax_error, #void_stmts, #warning, #whitespace_width, #wrap

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