diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-01 06:47:47 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-01 06:47:47 +0000 |
commit | c7d499225b4d035c17acf774a3d53e20d6301df7 (patch) | |
tree | e75ab42ee208290c1c4123178f1f8317f1fb3175 /parse.y | |
parent | 11fef7fd630528ac1b6c55739cb1affb2208944c (diff) |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -861,14 +861,14 @@ opt_call_args : none | call_args opt_nl call_args : command_call - { - value_expr($1); - $$ = NEW_LIST($1); - } | args ',' { $$ = $1; } + | args ',' command_call + { + $$ = list_append($1, $3); + } | args opt_block_arg { $$ = arg_blk_pass($1, $2); @@ -1592,7 +1592,19 @@ f_args : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg f_norm_arg : tCONSTANT { - yyerror("formal argument must not be constant"); + yyerror("formal argument cannot be a constant"); + } + | tIVAR + { + yyerror("formal argument cannot be an instance variable"); + } + | tGVAR + { + yyerror("formal argument cannot be a global variable"); + } + | tCVAR + { + yyerror("formal argument cannot be a class variable"); } | tIDENTIFIER { |