Changeset 3893 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.jj
- Timestamp:
- 2011-02-12T20:30:01+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/parser/MapCSSParser.jj
r3888 r3893 290 290 { 291 291 boolean not = false; 292 boolean yes = false; 292 293 String key; 293 294 } … … 295 296 ( <EXCLAMATION> { not = true; } )? 296 297 key=string_or_ident() 297 { return new Condition.KeyCondition(key, not); } 298 ( <QUESTION> { yes = true; } )? 299 { return new Condition.KeyCondition(key, not, yes); } 298 300 } 299 301 … … 504 506 JAVACODE 505 507 void error_skipto(int kind) { 508 if (token.kind == EOF) 509 throw new ParseException("Reached end of file while parsing"); 506 510 ParseException e = generateParseException(); 507 511 System.err.println("Skipping to the next rule, because of an error:"); 508 512 System.err.println(e); 509 513 if (sheet != null) { 510 sheet.logError( e);514 sheet.logError(new ParseException(e.getMessage())); 511 515 } 512 516 Token t; … … 527 531 while (true) { 528 532 t = getNextToken(); 533 if ((t.kind == S || t.kind == STRING || t.kind == UNEXPECTED_CHAR) && 534 t.image.contains("\n")) { 535 ParseException e = new ParseException(String.format("Warning: end of line while reading an unquoted string at line %s column %s.", t.beginLine, t.beginColumn)); 536 System.err.println(e); 537 if (sheet != null) { 538 sheet.logError(e); 539 } 540 } 529 541 if (t.kind == SEMICOLON || t.kind == EOF) 530 542 break;
Note:
See TracChangeset
for help on using the changeset viewer.