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
1dc0da82
Commit
1dc0da82
authored
Oct 30, 2019
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix here-doc inside parens and brackets; fix #4796
parent
fdc0219d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
+11
-14
No files found.
mrbgems/mruby-compiler/core/parse.y
View file @
1dc0da82
...
...
@@ -1620,7 +1620,7 @@ command_asgn : lhs '=' command_rhs
{
$$ = new_op_asgn(p, $1, $2, $3);
}
| primary_value '[' opt_call_args
rbracket
tOP_ASGN command_rhs
| primary_value '[' opt_call_args
']'
tOP_ASGN command_rhs
{
$$ = new_op_asgn(p, new_call(p, $1, intern("[]",2), $3, '.'), $5, $6);
}
...
...
@@ -1849,7 +1849,7 @@ mlhs_node : variable
{
assignable(p, $1);
}
| primary_value '[' opt_call_args
rbracket
| primary_value '[' opt_call_args
']'
{
$$ = new_call(p, $1, intern("[]",2), $3, '.');
}
...
...
@@ -1888,7 +1888,7 @@ lhs : variable
{
assignable(p, $1);
}
| primary_value '[' opt_call_args
rbracket
| primary_value '[' opt_call_args
']'
{
$$ = new_call(p, $1, intern("[]",2), $3, '.');
}
...
...
@@ -2028,7 +2028,7 @@ arg : lhs '=' arg_rhs
{
$$ = new_op_asgn(p, $1, $2, $3);
}
| primary_value '[' opt_call_args
rbracket
tOP_ASGN arg_rhs
| primary_value '[' opt_call_args
']'
tOP_ASGN arg_rhs
{
$$ = new_op_asgn(p, new_call(p, $1, intern("[]",2), $3, '.'), $5, $6);
}
...
...
@@ -2226,7 +2226,7 @@ arg_rhs : arg %prec tOP_ASGN
}
;
paren_args : '(' opt_call_args
rparen
paren_args : '(' opt_call_args
')'
{
$$ = $2;
}
...
...
@@ -2237,18 +2237,18 @@ opt_paren_args : none
;
opt_call_args : none
| call_args
| args
','
| call_args
opt_terms
| args
comma
{
$$ = cons($1,0);
NODE_LINENO($$, $1);
}
| args comma assocs
','
| args comma assocs
comma
{
$$ = cons(push($1, new_kw_hash(p, $3)), 0);
NODE_LINENO($$, $1);
}
| assocs
','
| assocs
comma
{
$$ = cons(list1(new_kw_hash(p, $1)), 0);
NODE_LINENO($$, $1);
...
...
@@ -2929,7 +2929,7 @@ method_call : operation paren_args
{
$$ = new_zsuper(p);
}
| primary_value '[' opt_call_args
rbracket
| primary_value '[' opt_call_args
']'
{
$$ = new_call(p, $1, intern("[]",2), $3, '.');
}
...
...
@@ -3725,11 +3725,8 @@ opt_nl : /* none */
rparen : opt_nl ')'
;
rbracket : opt_nl ']'
;
trailer : /* none */
|
nl
|
terms
| comma
;
...
...
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