Ignore:
Timestamp:
2015-05-05T22:08:03+02:00 (9 years ago)
Author:
simon04
Message:

fix #10278 - MapCSSTagChecker: preprocess MapCSS for media queries support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj

    r8260 r8331  
    99
    1010import java.io.InputStream;
     11import java.io.Reader;
    1112import java.util.ArrayList;
    1213import java.util.Arrays;
     
    8788            throw new RuntimeException(e);
    8889        }
     90        return new MapCSSParserTokenManager(scs, initState.idx);
     91    }
     92
     93    /**
     94     * Constructor which initializes the parser with a certain lexical state.
     95     */
     96    public MapCSSParser(Reader in, LexicalState initState) {
     97        this(createTokenManager(in, initState));
     98        declarationCounter = 0;
     99    }
     100
     101    protected static MapCSSParserTokenManager createTokenManager(Reader in, LexicalState initState) {
     102        final SimpleCharStream scs = new SimpleCharStream(in, 1, 1);
    89103        return new MapCSSParserTokenManager(scs, initState.idx);
    90104    }
Note: See TracChangeset for help on using the changeset viewer.