diff options
| author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-19 05:50:17 +0000 |
|---|---|---|
| committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-19 05:50:17 +0000 |
| commit | 4149550dc0ba8cd0a34176fd28c532077dc03fa4 (patch) | |
| tree | 00b71ebc39d4a599a403c88eddb8d44abdcdd020 /ext/ripper | |
| parent | a80be49b1e16ce8eb288fb2d97016a0d148e81db (diff) | |
| download | ruby-4149550dc0ba8cd0a34176fd28c532077dc03fa4.tar.gz ruby-4149550dc0ba8cd0a34176fd28c532077dc03fa4.tar.xz ruby-4149550dc0ba8cd0a34176fd28c532077dc03fa4.zip | |
* ext/ripper/eventids2.c: add prefix `t' to lambda related lexer events.
* ext/ripper/lib/ripper/core.rb: updated.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/ripper')
| -rw-r--r-- | ext/ripper/eventids2.c | 18 | ||||
| -rw-r--r-- | ext/ripper/lib/ripper/core.rb | 30 |
2 files changed, 24 insertions, 24 deletions
diff --git a/ext/ripper/eventids2.c b/ext/ripper/eventids2.c index fc8e28ea6..90e677ed8 100644 --- a/ext/ripper/eventids2.c +++ b/ext/ripper/eventids2.c @@ -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}, diff --git a/ext/ripper/lib/ripper/core.rb b/ext/ripper/lib/ripper/core.rb index b16f465c3..6f2d8d18c 100644 --- a/ext/ripper/lib/ripper/core.rb +++ b/ext/ripper/lib/ripper/core.rb @@ -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 |
