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
d606f9d3
Commit
d606f9d3
authored
Sep 03, 2013
by
take_cheeze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix line number after first file
parent
968f5d2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/parse.y
src/parse.y
+6
-2
No files found.
src/parse.y
View file @
d606f9d3
...
...
@@ -5037,7 +5037,7 @@ parser_init_cxt(parser_state *p, mrbc_context *cxt)
{
if (!cxt) return;
if (cxt->lineno) p->lineno = cxt->lineno;
if (cxt->filename)
p->filename = cxt->filename
;
if (cxt->filename)
mrb_parser_set_filename(p, cxt->filename)
;
if (cxt->syms) {
int i;
...
...
@@ -5136,6 +5136,10 @@ mrb_parser_new(mrb_state *mrb)
p->lex_strterm = NULL;
p->heredocs = p->parsing_heredoc = NULL;
p->current_filename_index = -1;
p->filename_table = NULL;
p->filename_table_length = 0;
return p;
}
...
...
@@ -5186,7 +5190,7 @@ mrb_parser_set_filename(struct mrb_parser_state* p, char const* f)
mrb_sym const sym = mrb_intern(p->mrb, f);
size_t len;
p->filename = mrb_sym2name_len(p->mrb, sym, &len);
p->lineno = 1;
p->lineno =
(p->filename_table_length > 0)? 0 :
1;
size_t i;
for(i = 0; i < p->filename_table_length; ++i) {
...
...
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