Class LanguageDef
java.lang.Object
com.codename1.ui.editor.LanguageDef
Describes the lexical rules of a programming language for the pure code editor's tokenizer: its
keyword set, comment styles, string delimiters and number syntax. The keyword lists match the ones
the previous
BrowserComponent highlighter used.-
Method Summary
Modifier and TypeMethodDescriptionstatic LanguageDefReturns the language definition for the given language id, defaulting to a plain text definition (no highlighting) for unknown ids.booleanTrue when/* */block comments are supported.booleanTrue when#starts a line comment.booleanTrue when//starts a line comment.booleanTrue when backtick template strings (which may span lines) are supported.booleanTrue whenwordis a keyword in this language.booleanisPlain()True for plain text (no syntax highlighting at all).
-
Method Details
-
isPlain
public boolean isPlain()True for plain text (no syntax highlighting at all). -
isKeyword
True whenwordis a keyword in this language. -
hasLineCommentSlash
public boolean hasLineCommentSlash()True when//starts a line comment. -
hasLineCommentHash
public boolean hasLineCommentHash()True when#starts a line comment. -
hasBlockComment
public boolean hasBlockComment()True when/* */block comments are supported. -
hasTemplateString
public boolean hasTemplateString()True when backtick template strings (which may span lines) are supported. -
forName
Returns the language definition for the given language id, defaulting to a plain text definition (no highlighting) for unknown ids.
-