diff options
author | Yukihiro Matsumoto <matz@ruby-lang.org> | 1995-02-09 16:18:37 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-17 22:09:31 +0900 |
commit | c080fb6d10bbcb697b6ba16e640de8db3f1973d0 (patch) | |
tree | 2df6299a382a47f1bed94ea2c8dedc64113d79c9 /parse.y | |
parent | 897cf066952978ccbae1d57bbc14a03c7b98a1e1 (diff) |
version 0.66v0_66
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.65-0.66.diff.gz
Thu Feb 9 16:18:37 1995 Yukihiro Matsumoto (matz@ix-02)
* version 0.66
* parse.y: protectをbeginに変更.begin..endは例外処理だけでなく,
文括弧としても働くことになった.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -90,6 +90,10 @@ static void setup_top_local(); DEF UNDEF INCLUDE + BEGIN + RESQUE + ENSURE + END IF THEN ELSIF @@ -99,10 +103,6 @@ static void setup_top_local(); WHILE FOR IN - PROTECT - RESQUE - ENSURE - END REDO BREAK CONTINUE @@ -762,18 +762,17 @@ primary : literal value_expr($4); $$ = NEW_FOR($2, $4, $6); } - | PROTECT + | BEGIN compexpr resque ensure END { if ($3 == Qnil && $4 == Qnil) { - Warning("useless protect clause"); $$ = $2; } else { - $$ = NEW_PROT($2, $3, $4); + $$ = NEW_BEGIN($2, $3, $4); } } | LPAREN compexpr rparen @@ -1312,6 +1311,7 @@ static struct kwtable { "__LINE__", _LINE_, EXPR_END, "alias", ALIAS, EXPR_FNAME, "and", AND, EXPR_BEG, + "begin", BEGIN, EXPR_BEG, "break", BREAK, EXPR_END, "case", CASE, EXPR_BEG, "class", CLASS, EXPR_BEG, @@ -1329,7 +1329,6 @@ static struct kwtable { "module", MODULE, EXPR_BEG, "nil", NIL, EXPR_END, "or", OR, EXPR_BEG, - "protect", PROTECT, EXPR_BEG, "redo", REDO, EXPR_END, "resque", RESQUE, EXPR_BEG, "retry", RETRY, EXPR_END, |