Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
95d1d002
Commit
95d1d002
authored
May 11, 2012
by
Yukihiro Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
begin/end block should be isolated from outside; ported from CRuby r35620
parent
3483e360
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
src/parse.y
src/parse.y
+9
-4
No files found.
src/parse.y
View file @
95d1d002
...
@@ -814,6 +814,7 @@ var_reference(parser_state *p, node *lhs)
...
@@ -814,6 +814,7 @@ var_reference(parser_state *p, node *lhs)
node *node;
node *node;
mrb_sym id;
mrb_sym id;
int num;
int num;
unsigned int stack;
const struct vtable *vars;
const struct vtable *vars;
}
}
...
@@ -1779,13 +1780,12 @@ call_args : command
...
@@ -1779,13 +1780,12 @@ call_args : command
;
;
command_args : {
command_args : {
$<
num
>$ = p->cmdarg_stack;
$<
stack
>$ = p->cmdarg_stack;
CMDARG_PUSH(1);
CMDARG_PUSH(1);
}
}
call_args
call_args
{
{
/* CMDARG_POP() */
p->cmdarg_stack = $<stack>1;
p->cmdarg_stack = $<num>1;
$$ = $2;
$$ = $2;
}
}
;
;
...
@@ -1848,10 +1848,15 @@ primary : literal
...
@@ -1848,10 +1848,15 @@ primary : literal
$$ = new_fcall(p, $1, 0);
$$ = new_fcall(p, $1, 0);
}
}
| keyword_begin
| keyword_begin
{
$<stack>1 = p->cmdarg_stack;
p->cmdarg_stack = 0;
}
bodystmt
bodystmt
keyword_end
keyword_end
{
{
$$ = $2;
p->cmdarg_stack = $<stack>1;
$$ = $3;
}
}
| tLPAREN_ARG expr {p->lstate = EXPR_ENDARG;} rparen
| tLPAREN_ARG expr {p->lstate = EXPR_ENDARG;} rparen
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment