Skip to content

Commit 24f81b5

Browse files
committed
Merge pull request #979 from mgreter/bugfix/issue_972
Fix reported position when no token can be parsed
2 parents 6a740b1 + 5c88a6b commit 24f81b5

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

parser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ namespace Sass {
143143
}
144144
else {
145145
lex< css_whitespace >();
146+
before_token = after_token;
146147
if (position >= end) break;
147148
error("invalid top-level expression", pstate);
148149
}

prelexer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ namespace Sass {
6262
return line_comment(src);
6363
}
6464

65+
/* not used anymore - remove?
6566
const char* wspaces(const char* src) {
6667
return
6768
alternatives<
6869
exactly<' '>,
6970
exactly<'\t'>
7071
>(src);
71-
}
72+
}*/
7273

7374
/* not used anymore - remove?
7475
const char* newline(const char* src) {

prelexer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ namespace Sass {
261261
const char* alnums(const char* src);
262262
const char* puncts(const char* src);
263263
// Match certain white-space charactes.
264-
const char* wspaces(const char* src);
264+
// const char* wspaces(const char* src);
265265
// const char* newline(const char* src);
266266
// const char* whitespace(const char* src);
267267

0 commit comments

Comments
 (0)