1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/ripper/eventids2.c: add prefix `t' to lambda related lexer events.

* ext/ripper/lib/ripper/core.rb: updated.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2005-09-19 05:50:17 +00:00
parent dfd45277d0
commit ae860f9a56
3 changed files with 31 additions and 24 deletions

View file

@ -1,3 +1,10 @@
Mon Sep 19 14:49:19 2005 Minero Aoki <aamine@loveruby.net>
* ext/ripper/eventids2.c: add prefix `t' to lambda related lexer
events.
* ext/ripper/lib/ripper/core.rb: updated.
Mon Sep 19 14:39:46 2005 Minero Aoki <aamine@loveruby.net>
* parse.y (do_block): do_block event dispatches 2 args.

View file

@ -43,9 +43,9 @@ static ID ripper_id_words_sep;
static ID ripper_id_regexp_beg;
static ID ripper_id_regexp_end;
static ID ripper_id_label;
static ID ripper_id_lambda;
static ID ripper_id_lambda_arg;
static ID ripper_id_lambeg;
static ID ripper_id_tlambda;
static ID ripper_id_tlambda_arg;
static ID ripper_id_tlambeg;
static ID ripper_id_ignored_nl;
static ID ripper_id_comment;
@ -95,9 +95,9 @@ ripper_init_eventids2()
ripper_id_regexp_beg = rb_intern("on_regexp_beg");
ripper_id_regexp_end = rb_intern("on_regexp_end");
ripper_id_label = rb_intern("on_label");
ripper_id_lambda = rb_intern("on_lambda");
ripper_id_lambda_arg = rb_intern("on_lambda_arg");
ripper_id_lambeg = rb_intern("on_lambeg");
ripper_id_tlambda = rb_intern("on_tlambda");
ripper_id_tlambda_arg = rb_intern("on_tlambda_arg");
ripper_id_tlambeg = rb_intern("on_tlambeg");
ripper_id_ignored_nl = rb_intern("on_ignored_nl");
ripper_id_comment = rb_intern("on_comment");
@ -243,9 +243,9 @@ static struct token_assoc {
{tWORDS_BEG, &ripper_id_words_beg},
{tXSTRING_BEG, &ripper_id_backtick},
{tLABEL, &ripper_id_label},
{tLAMBDA, &ripper_id_lambda},
{tLAMBDA_ARG, &ripper_id_lambda_arg},
{tLAMBEG, &ripper_id_lambeg},
{tLAMBDA, &ripper_id_tlambda},
{tLAMBDA_ARG, &ripper_id_tlambda_arg},
{tLAMBEG, &ripper_id_tlambeg},
/* ripper specific tokens */
{tIGNORED_NL, &ripper_id_ignored_nl},

View file

@ -176,9 +176,6 @@ class Ripper
:ivar => 1,
:kw => 1,
:label => 1,
:lambda => 1,
:lambda_arg => 1,
:lambeg => 1,
:lbrace => 1,
:lbracket => 1,
:lparen => 1,
@ -194,6 +191,9 @@ class Ripper
:semicolon => 1,
:sp => 1,
:symbeg => 1,
:tlambda => 1,
:tlambda_arg => 1,
:tlambeg => 1,
:tstring_beg => 1,
:tstring_content => 1,
:tstring_end => 1,
@ -819,18 +819,6 @@ class Ripper
token
end
def on_lambda(token)
token
end
def on_lambda_arg(token)
token
end
def on_lambeg(token)
token
end
def on_lbrace(token)
token
end
@ -891,6 +879,18 @@ class Ripper
token
end
def on_tlambda(token)
token
end
def on_tlambda_arg(token)
token
end
def on_tlambeg(token)
token
end
def on_tstring_beg(token)
token
end