Permalink
Browse files

fixed bug with constants and xml

  • Loading branch information...
1 parent 016aa7e commit db0976262460ba7030591a660f13d80f91f1cac5 @dfranek committed Mar 10, 2012
@@ -90,11 +90,7 @@ public TSTokenId nextToken() throws java.io.IOException {
} else if (ch == '\n') {
token = TSTokenId.TS_NL;
state = TSLexerState.DEFAULT;
- } else if(state == TSLexerState.IN_VALUE && ch == '#') {
- nextUntilUnescaped('\n');
- token = TSTokenId.TS_COMMENT;
- state = TSLexerState.DEFAULT;
- }else if (state != TSLexerState.IN_VALUE && state == TSLexerState.IN_COMMENT) {
+ } else if (state != TSLexerState.IN_VALUE && state == TSLexerState.IN_COMMENT) {
token = readMultilineComment(ch);
} else if (isWhiteSpace(ch)) {
nextWhileWhiteSpace();
@@ -177,8 +177,6 @@ public void testConstantAndComment() {
TSLexerTestUtils.next(ts, TSTokenId.TS_VALUE, "favicon");
TSLexerTestUtils.next(ts, TSTokenId.TS_OPERATOR, ".");
TSLexerTestUtils.next(ts, TSTokenId.TS_RESERVED, "icon");
- TSLexerTestUtils.next(ts, TSTokenId.WHITESPACE, " ");
- TSLexerTestUtils.next(ts, TSTokenId.TS_COMMENT, "# But doesn't work ofcourse");
}
}

0 comments on commit db09762

Please sign in to comment.