Changeset 11374 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
- Timestamp:
- 2016-12-09T23:31:13+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r10837 r11374 40 40 import org.openstreetmap.josm.gui.mappaint.mapcss.Subpart; 41 41 import org.openstreetmap.josm.tools.ColorHelper; 42 import org.openstreetmap.josm.tools.JosmRuntimeException; 42 43 import org.openstreetmap.josm.tools.Pair; 43 44 import org.openstreetmap.josm.tools.Utils; … … 66 67 */ 67 68 public static enum LexicalState { 68 PREPROCESSOR(0), /* the preprocessor */ 69 DEFAULT(2); /* the main parser */ 70 69 /** the preprocessor */ 70 PREPROCESSOR(0), 71 /** the main parser */ 72 DEFAULT(2); 73 71 74 int idx; // the integer, which javacc assigns to this state 72 75 73 76 LexicalState(int idx) { 74 77 if (!this.name().equals(MapCSSParserTokenManager.lexStateNames[idx])) { 75 throw new RuntimeException();78 throw new JosmRuntimeException("Wrong name for index " + idx); 76 79 } 77 80 this.idx = idx; 78 81 } 79 } ;82 } 80 83 81 84 /** … … 95 98 scs = new SimpleCharStream(in, encoding, 1, 1); 96 99 } catch (java.io.UnsupportedEncodingException e) { 97 throw new RuntimeException(e);100 throw new JosmRuntimeException(e); 98 101 } 99 102 return new MapCSSParserTokenManager(scs, initState.idx);
Note: See TracChangeset
for help on using the changeset viewer.