summaryrefslogtreecommitdiff
path: root/ext/ripper/lib/ripper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ripper/lib/ripper.rb')
-rw-r--r--ext/ripper/lib/ripper.rb174
1 files changed, 50 insertions, 124 deletions
diff --git a/ext/ripper/lib/ripper.rb b/ext/ripper/lib/ripper.rb
index b34147ee2a8..15a05aaddcf 100644
--- a/ext/ripper/lib/ripper.rb
+++ b/ext/ripper/lib/ripper.rb
@@ -28,6 +28,7 @@ class Ripper
end
PARSER_EVENTS = [
+
:BEGIN,
:END,
:alias,
@@ -151,126 +152,51 @@ class Ripper
]
SCANNER_EVENTS = [
- :BEGIN,
- :END,
- :alias,
- :alias_error,
- :aref,
- :aref_field,
- :arg_ambiguous,
- :arg_paren,
- :arglist_add,
- :arglist_add_block,
- :arglist_add_star,
- :arglist_new,
- :arglist_prepend,
- :array,
- :assign,
- :assign_error,
- :assoc_new,
- :assoclist_from_args,
- :bare_assoc_hash,
- :begin,
- :binary,
- :blockvar_add_block,
- :blockvar_add_star,
- :blockvar_new,
- :bodystmt,
- :brace_block,
- :break,
- :call,
- :case,
- :class,
- :class_name_error,
- :command,
- :command_call,
- :const_ref,
- :constpath_field,
- :constpath_ref,
- :def,
- :defined,
- :defs,
- :do_block,
- :dot2,
- :dot3,
- :dyna_symbol,
- :else,
- :elsif,
- :ensure,
- :fcall,
- :field,
- :for,
- :hash,
- :if,
- :if_mod,
- :ifop,
- :iter_block,
- :massign,
- :method_add_arg,
- :mlhs_add,
- :mlhs_add_star,
- :mlhs_new,
- :mlhs_paren,
- :module,
- :mrhs_add,
- :mrhs_add_star,
- :mrhs_new,
- :mrhs_new_from_arglist,
- :next,
- :opassign,
- :param_error,
- :params,
- :paren,
- :parse_error,
- :program,
- :qwords_add,
- :qwords_new,
- :redo,
- :regexp_literal,
- :rescue,
- :rescue_mod,
- :restparam,
- :retry,
- :return,
- :return0,
- :sclass,
- :space,
- :stmts_add,
- :stmts_new,
- :string_add,
- :string_concat,
- :string_content,
- :string_dvar,
- :string_embexpr,
- :string_literal,
- :super,
- :symbol,
- :symbol_literal,
- :topconst_field,
- :topconst_ref,
- :unary,
- :undef,
- :unless,
- :unless_mod,
- :until,
- :until_mod,
- :var_alias,
- :var_field,
- :var_ref,
- :void_stmt,
- :when,
- :while,
- :while_mod,
- :word_add,
- :word_new,
- :words_add,
- :words_new,
- :xstring_add,
- :xstring_literal,
- :xstring_new,
- :yield,
- :yield0,
- :zsuper
+
+ :CHAR,
+ :__end__,
+ :backref,
+ :backtick,
+ :comma,
+ :comment,
+ :const,
+ :cvar,
+ :embdoc,
+ :embdoc_beg,
+ :embdoc_end,
+ :embexpr_beg,
+ :embexpr_end,
+ :embvar,
+ :float,
+ :gvar,
+ :heredoc_beg,
+ :heredoc_content,
+ :heredoc_end,
+ :ident,
+ :ignored_nl,
+ :int,
+ :ivar,
+ :kw,
+ :lbrace,
+ :lbracket,
+ :lparen,
+ :nl,
+ :op,
+ :period,
+ :qwords_beg,
+ :rbrace,
+ :rbracket,
+ :regexp_beg,
+ :regexp_end,
+ :rparen,
+ :semicolon,
+ :sp,
+ :symbeg,
+ :tstring_beg,
+ :tstring_content,
+ :tstring_end,
+ :words_beg,
+ :words_sep
]
LEXER_EVENTS = SCANNER_EVENTS
@@ -875,10 +801,6 @@ class Ripper
token
end
- def on__lwsp(token)
- token
- end
-
def on__nl(token)
token
end
@@ -919,6 +841,10 @@ class Ripper
token
end
+ def on__sp(token)
+ token
+ end
+
def on__symbeg(token)
token
end