This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 196967
Collapse All | Expand All

(-)a/javascript.editing/src/org/netbeans/modules/javascript/editing/lexer/JsLexer.java (-2 / +5 lines)
Lines 206-212 Link Here
206
        int token;
206
        int token;
207
207
208
        try {
208
        try {
209
            token = tokenStream.getToken() & Parser.CLEAR_TI_MASK;
209
            token = tokenStream.getToken();
210
            //ERROR is -1 (the only negative token), with all bits on 1 and I don't want to AND that.
211
            if (token != org.mozilla.nb.javascript.Token.ERROR) {
212
                token = token & Parser.CLEAR_TI_MASK;
213
            }
210
        } catch (IOException ex) {
214
        } catch (IOException ex) {
211
            ErrorManager.getDefault().notify(ex);
215
            ErrorManager.getDefault().notify(ex);
212
            token = org.mozilla.nb.javascript.Token.ERROR;
216
            token = org.mozilla.nb.javascript.Token.ERROR;
Lines 236-242 Link Here
236
    private JsTokenId getTokenId(int token) {
240
    private JsTokenId getTokenId(int token) {
237
        // If you add any new token types here, remember to update #getRelevantTokenTypes below
241
        // If you add any new token types here, remember to update #getRelevantTokenTypes below
238
        switch (token) {
242
        switch (token) {
239
        case 65535: // SIGN ERRORS! Why does this happen?
240
        case Token.ERROR://          = -1, // well-known as the only code < EOF
243
        case Token.ERROR://          = -1, // well-known as the only code < EOF
241
            return JsTokenId.ERROR;
244
            return JsTokenId.ERROR;
242
        case Token.LINE_COMMENT:
245
        case Token.LINE_COMMENT:

Return to bug 196967