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
9a5e93bf
Commit
9a5e93bf
authored
Apr 23, 2012
by
NAKAMURA Usaku
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
``__END__'' must start at the beginning of the line.
parent
daedb2b9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
src/parse.y
src/parse.y
+11
-9
No files found.
src/parse.y
View file @
9a5e93bf
...
...
@@ -3125,10 +3125,11 @@ enum string_type {
str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
};
static
void
static
int
newtok(parser_state *p)
{
p->bidx = 0;
return p->column - 1;
}
static void
...
...
@@ -3420,6 +3421,7 @@ parser_yylex(parser_state *p)
int space_seen = 0;
int cmd_state;
enum mrb_lex_state_enum last_state;
int token_column;
if (p->sterm) {
return parse_string(p, p->sterm);
...
...
@@ -3675,7 +3677,7 @@ parser_yylex(parser_state *p)
p->lstate = EXPR_VALUE;
return '?';
}
newtok(p);
token_column =
newtok(p);
// need support UTF-8 if configured
if ((isalnum(c) || c == '_')) {
int c2 = nextc(p);
...
...
@@ -3848,7 +3850,7 @@ parser_yylex(parser_state *p)
is_float = seen_point = seen_e = nondigit = 0;
p->lstate = EXPR_END;
newtok(p);
token_column =
newtok(p);
if (c == '-' || c == '+') {
tokadd(p, c);
c = nextc(p);
...
...
@@ -4337,7 +4339,7 @@ parser_yylex(parser_state *p)
case '$':
p->lstate = EXPR_END;
newtok(p);
token_column =
newtok(p);
c = nextc(p);
switch (c) {
case '_': /* $_: last read line string */
...
...
@@ -4415,7 +4417,7 @@ parser_yylex(parser_state *p)
case '@':
c = nextc(p);
newtok(p);
token_column =
newtok(p);
tokadd(p, '@');
if (c == '@') {
tokadd(p, '@');
...
...
@@ -4437,7 +4439,7 @@ parser_yylex(parser_state *p)
break;
case '_':
newtok(p);
token_column =
newtok(p);
break;
default:
...
...
@@ -4446,7 +4448,7 @@ parser_yylex(parser_state *p)
goto retry;
}
newtok(p);
token_column =
newtok(p);
break;
}
...
...
@@ -4455,8 +4457,8 @@ parser_yylex(parser_state *p)
c = nextc(p);
if (c < 0) break;
} while (identchar(c));
if (
p->column == 0 && p->bidx
== 7 && (c < 0 || c == '\n') &&
strncmp(tok(p), "__END__",
p->bidx
) == 0)
if (
token_column == 0 && toklen(p)
== 7 && (c < 0 || c == '\n') &&
strncmp(tok(p), "__END__",
toklen(p)
) == 0)
return -1;
switch (tok(p)[0]) {
...
...
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