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
8b13efc2
Commit
8b13efc2
authored
Apr 30, 2014
by
Nobuyoshi Nakada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
count skipped line numbers
parent
cf3b880d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
src/parse.y
src/parse.y
+8
-1
test/t/syntax.rb
test/t/syntax.rb
+2
-1
No files found.
src/parse.y
View file @
8b13efc2
...
...
@@ -3475,6 +3475,10 @@ skips(parser_state *p, const char *s)
for (;;) {
c = nextc(p);
if (c < 0) return c;
if (c == '\n') {
p->lineno++;
p->column = 0;
}
if (c == *s) break;
}
s++;
...
...
@@ -3482,7 +3486,10 @@ skips(parser_state *p, const char *s)
int len = strlen(s);
while (len--) {
nextc(p);
if (nextc(p) == '\n') {
p->lineno++;
p->column = 0;
}
}
return TRUE;
}
...
...
test/t/syntax.rb
View file @
8b13efc2
...
...
@@ -307,8 +307,9 @@ this is a comment that has =end with spaces after it
=begin this is a comment
this is a comment that has extra after =begin and =end with spaces after it
=end
line
=
__LINE__
=begin this is a comment
this is a comment that has extra after =begin and =end with tabs after it
=end
xxxxxxxxxxxxxxxxxxxxxxxxxx
true
assert_equal
(
line
+
4
,
__LINE__
)
end
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