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 121711
Collapse All | Expand All

(-)cnd/completion/src/org/netbeans/modules/cnd/completion/cplusplus/ext/CsmCompletionTokenProcessor.java (-1 / +14 lines)
Lines 601-607 Link Here
601
        CsmCompletionExpression constExp = null; // possibly assign constant into this exp
601
        CsmCompletionExpression constExp = null; // possibly assign constant into this exp
602
        String kwdType = CCTokenContext.isType(tokenID) ? curTokenText : null; // keyword constant type (used in conversions)
602
        String kwdType = CCTokenContext.isType(tokenID) ? curTokenText : null; // keyword constant type (used in conversions)
603
        
603
        
604
        if (tokenID == null) { // invalid token-id
604
        // clear stack on absent token or prerpocessor token
605
        if (tokenID == null || tokenID.getCategory() == CCTokenContext.CPP) {
605
            errorState = true;
606
            errorState = true;
606
607
607
        } else { // valid token-id
608
        } else { // valid token-id
Lines 1835-1840 Link Here
1835
    }
1836
    }
1836
1837
1837
    public int eot(int offset) {
1838
    public int eot(int offset) {
1839
        if (lastValidTokenID != null) {
1840
            // if space or comment occurs as last token
1841
            // add empty variable to save last position
1842
            switch (lastValidTokenID.getNumericID()) {
1843
                case CCTokenContext.WHITESPACE_ID:
1844
                case CCTokenContext.LINE_COMMENT_ID:
1845
                case CCTokenContext.BLOCK_COMMENT_ID:
1846
                    pushExp(CsmCompletionExpression.createEmptyVariable(
1847
                        bufferStartPos + bufferOffsetDelta + offset));
1848
                    break;
1849
            }
1850
        }        
1838
        // Check for joins
1851
        // Check for joins
1839
        boolean reScan = true;
1852
        boolean reScan = true;
1840
        while (reScan) {
1853
        while (reScan) {

Return to bug 121711