public class LessTokenMaker extends CSSTokenMaker
AbstractJFlexCTokenMaker.CStyleInsertBreakAction
CSS_C_STYLE_COMMENT, CSS_CHAR_LITERAL, CSS_PROPERTY, CSS_STRING, CSS_VALUE, INTERNAL_CSS_CHAR, INTERNAL_CSS_MLC, INTERNAL_CSS_PROPERTY, INTERNAL_CSS_STRING, INTERNAL_CSS_VALUE, LESS_EOL_COMMENT, YYEOF, YYINITIAL
offsetShift, s, start
currentToken, firstToken, previousToken
Constructor and Description |
---|
LessTokenMaker()
Constructor; overridden to enable the niceties added by Less.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getLineCommentStartAndEnd(int languageIndex)
Returns the text to place at the beginning and end of a
line to "comment" it in this programming language.
|
boolean |
getMarkOccurrencesOfTokenType(int type)
Returns whether tokens of the specified type should have "mark
occurrences" enabled for the current programming language.
|
addToken, getClosestStandardTokenTypeForInternalType, getCurlyBracesDenoteCodeBlocks, getShouldIndentNextLineAfter, getTokenList, isIdentifierChar, setHighlightingLess, yybegin, yycharat, yyclose, yylength, yylex, yypushback, yyreset, yystate, yytext
createInsertBreakAction, getCurlyBracesDenoteCodeBlocks, getInsertBreakAction
yybegin
addNullToken, addToken, addToken, createOccurrenceMarker, getLanguageIndex, getLastTokenTypeOnLine, getOccurrenceMarker, isMarkupLanguage, resetTokenList, setLanguageIndex
public LessTokenMaker()
public java.lang.String[] getLineCommentStartAndEnd(int languageIndex)
getLineCommentStartAndEnd
in interface TokenMaker
getLineCommentStartAndEnd
in class TokenMakerBase
languageIndex
- The language index at the offset in question.
Since some TokenMaker
s effectively have nested
languages (such as JavaScript in HTML), this parameter tells the
TokenMaker
what sub-language to look at.null
value for either means there
is no string to add for that part. A value of
null
for the array means this language
does not support commenting/uncommenting lines.public boolean getMarkOccurrencesOfTokenType(int type)
TokenTypes.IDENTIFIER
.
Subclasses can override this method to support other token types, such
as TokenTypes.VARIABLE
.getMarkOccurrencesOfTokenType
in interface TokenMaker
getMarkOccurrencesOfTokenType
in class CSSTokenMaker
type
- The token type.