void () { try { myCurrentToken = nextToken(); myCurrentOffset = myCurrentEnd; if (myCurrentToken != null) { myCurrentEnd = myCurrentOffset + myCurrentToken.image.length(); for (int i = myCurrentOffset; i < myCurrentEnd; i++) { myCurrentEnd += myLengthMap.get(i); } if (myCurrentToken.kind == CompactSyntaxConstants.EOF) { assert myCurrentOffset == myEndOffset : "actual: " + myCurrentOffset + ", expected: " + myEndOffset; myCurrentToken = null; } } // if (myCurrentToken != null) { // System.out.println("token = <" + RncTokenTypes.get(myCurrentToken.kind).toString() + "> [" + myCurrentToken.image + "]"); // } } catch (TokenMgrError e) { LOG.error(e); myCurrentToken = null; } if (myCurrentToken == null) { myCurrentTokenType = null; } else { myCurrentTokenType = RncTokenTypes.get(myCurrentToken.kind); // collapse whitespace tokens into TokenType.WHITE_SPACE [IDEA-12106] if (RncTokenTypes.WHITESPACE.contains(myCurrentTokenType)) { myCurrentTokenType = TokenType.WHITE_SPACE; } } }