Class LessTokenMaker

All Implemented Interfaces:
TokenMaker

public class LessTokenMaker extends CSSTokenMaker
Scanner for Less files.
Version:
1.0
  • Constructor Details

    • LessTokenMaker

      public LessTokenMaker()
      Constructor; overridden to enable the niceties added by Less.
  • Method Details

    • getLineCommentStartAndEnd

      public String[] getLineCommentStartAndEnd(int languageIndex)
      Description copied from interface: TokenMaker
      Returns the text to place at the beginning and end of a line to "comment" it in this programming language.
      Specified by:
      getLineCommentStartAndEnd in interface TokenMaker
      Overrides:
      getLineCommentStartAndEnd in class CSSTokenMaker
      Parameters:
      languageIndex - The language index at the offset in question. Since some TokenMakers effectively have nested languages (such as JavaScript in HTML), this parameter tells the TokenMaker what sub-language to look at.
      Returns:
      The start and end strings to add to a line to "comment" it out. A 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.
    • getMarkOccurrencesOfTokenType

      public boolean getMarkOccurrencesOfTokenType(int type)
      Description copied from class: TokenMakerBase
      Returns whether tokens of the specified type should have "mark occurrences" enabled for the current programming language. The default implementation returns true if type is TokenTypes.IDENTIFIER. Subclasses can override this method to support other token types, such as TokenTypes.VARIABLE.
      Specified by:
      getMarkOccurrencesOfTokenType in interface TokenMaker
      Overrides:
      getMarkOccurrencesOfTokenType in class CSSTokenMaker
      Parameters:
      type - The token type.
      Returns:
      Whether tokens of this type should have "mark occurrences" enabled.