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
3a30cc27
Unverified
Commit
3a30cc27
authored
3 years ago
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parse.y: move numbered parameter indexing to lexer.
parent
5dfbfb3e
No related merge requests found
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1006 additions
and
1007 deletions
+1006
-1007
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
+3
-4
mrbgems/mruby-compiler/core/y.tab.c
mrbgems/mruby-compiler/core/y.tab.c
+1003
-1003
No files found.
mrbgems/mruby-compiler/core/parse.y
View file @
3a30cc27
...
...
@@ -712,10 +712,6 @@ new_cvar(parser_state *p, mrb_sym sym)
static node*
new_nvar(parser_state *p, int num)
{
if (p->nvars) {
int nvars = intn(p->nvars->car);
p->nvars->car = nint(nvars > num ? nvars : num);
}
return cons((node*)NODE_NVAR, nint(num));
}
...
...
@@ -6429,6 +6425,9 @@ parser_yylex(parser_state *p)
if (nvar == -1) {
yywarning(p, "numbered parameter used in inner block");
}
else {
p->nvars->car = nint(nvar > n ? nvar : n);
}
pylval.num = n;
p->lstate = EXPR_END;
return tNUMPARAM;
...
...
This diff is collapsed.
Click to expand it.
mrbgems/mruby-compiler/core/y.tab.c
View file @
3a30cc27
This diff is collapsed.
Click to expand it.
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