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
31fc74f5
Unverified
Commit
31fc74f5
authored
Sep 12, 2021
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parse.y: fix `nint` (int to node) and `intn` (node to int).
parent
9e86d204
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
228 additions
and
220 deletions
+228
-220
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
+9
-5
mrbgems/mruby-compiler/core/y.tab.c
mrbgems/mruby-compiler/core/y.tab.c
+219
-215
No files found.
mrbgems/mruby-compiler/core/parse.y
View file @
31fc74f5
...
@@ -3306,7 +3306,7 @@ string_fragment : tCHAR
...
@@ -3306,7 +3306,7 @@ string_fragment : tCHAR
| tSTRING_BEG string_rep tSTRING
| tSTRING_BEG string_rep tSTRING
{
{
node *n = $2;
node *n = $2;
if (
nint
($3->cdr->cdr) > 0) {
if (
intn
($3->cdr->cdr) > 0) {
n = push(n, $3);
n = push(n, $3);
}
}
$$ = new_dstr(p, n);
$$ = new_dstr(p, n);
...
@@ -3352,7 +3352,7 @@ xstring : tXSTRING_BEG tXSTRING
...
@@ -3352,7 +3352,7 @@ xstring : tXSTRING_BEG tXSTRING
| tXSTRING_BEG string_rep tXSTRING
| tXSTRING_BEG string_rep tXSTRING
{
{
node *n = $2;
node *n = $2;
if (
nint
($3->cdr->cdr) > 0) {
if (
intn
($3->cdr->cdr) > 0) {
n = push(n, $3);
n = push(n, $3);
}
}
$$ = new_dxstr(p, n);
$$ = new_dxstr(p, n);
...
@@ -3419,7 +3419,7 @@ words : tWORDS_BEG tSTRING
...
@@ -3419,7 +3419,7 @@ words : tWORDS_BEG tSTRING
| tWORDS_BEG string_rep tSTRING
| tWORDS_BEG string_rep tSTRING
{
{
node *n = $2;
node *n = $2;
if (
nint
($3->cdr->cdr) > 0) {
if (
intn
($3->cdr->cdr) > 0) {
n = push(n, $3);
n = push(n, $3);
}
}
$$ = new_words(p, n);
$$ = new_words(p, n);
...
@@ -3436,7 +3436,7 @@ symbol : basic_symbol
...
@@ -3436,7 +3436,7 @@ symbol : basic_symbol
{
{
node *n = $3;
node *n = $3;
p->lstate = EXPR_ENDARG;
p->lstate = EXPR_ENDARG;
if (
nint
($4->cdr->cdr) > 0) {
if (
intn
($4->cdr->cdr) > 0) {
n = push(n, $4);
n = push(n, $4);
}
}
$$ = new_dsym(p, new_dstr(p, n));
$$ = new_dsym(p, new_dstr(p, n));
...
@@ -3469,7 +3469,11 @@ symbols : tSYMBOLS_BEG tSTRING
...
@@ -3469,7 +3469,11 @@ symbols : tSYMBOLS_BEG tSTRING
}
}
| tSYMBOLS_BEG string_rep tSTRING
| tSYMBOLS_BEG string_rep tSTRING
{
{
$$ = new_symbols(p, push($2, $3));
node *n = $2;
if (intn($3->cdr->cdr) > 0) {
n = push(n, $3);
}
$$ = new_symbols(p, n);
}
}
;
;
...
...
mrbgems/mruby-compiler/core/y.tab.c
View file @
31fc74f5
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