@Override public Token getTokenList(Segment text, int initialTokenType, int startOffset) { Token tokens = super.getTokenList(text, initialTokenType, startOffset); if (startOffset > 0 && tokens.getType() != TokenTypes.NULL) { try { processTokens(tokens); } catch (Exception e) { LOG.error("Process tokens failed for text: {}", text, e); } } return tokens; }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. * @see #addToken(int, int, int) */ private void addHyperlinkToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so, true); }
private static int [] zzUnpackRowMap() { int [] result = new int[2711]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; }
private static int [] zzUnpackAction() { int [] result = new int[1885]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
private static int [] zzUnpackRowMap() { int [] result = new int[257]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; }
private static int [] zzUnpackAction() { int [] result = new int[512]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int tokenType) { addToken(zzStartRead, zzMarkedPos-1, tokenType); }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int tokenType) { addToken(zzStartRead, zzMarkedPos-1, tokenType); }
private static int [] zzUnpackTrans() { int [] result = new int[918]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; }
/** * Constructor; overridden to enable the niceties added by Less. */ public LessTokenMaker() { setHighlightingLess(true); }
/** * {@inheritDoc} */ @Override public boolean getMarkOccurrencesOfTokenType(int type) { return type == TokenTypes.VARIABLE || super.getMarkOccurrencesOfTokenType(type); }
private static int [] zzUnpackAction() { int [] result = new int[795]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; }
private static int [] zzUnpackRowMap() { int [] result = new int[795]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; }
private static int [] zzUnpackAttribute() { int [] result = new int[634]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; }
private static int [] zzUnpackRowMap() { int [] result = new int[24]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; }
private static int [] zzUnpackAttribute() { int [] result = new int[24]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. * @see #addToken(int, int, int) */ private void addHyperlinkToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so, true); }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. * @see #addHyperlinkToken(int, int, int) */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so, false); }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so); }
/** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so, false); }