SyntaxSupport

interface for custom syntax highlight, comments toggling, smart indents, and other language dependent features for source code editors

Members

Functions

applySmartIndent
void applySmartIndent(EditOperation op, Object source)

apply smart indent after edit operation, if needed

canToggleBlockComment
bool canToggleBlockComment(TextRange range)

return true if can toggle block comments for specified text range

canToggleLineComment
bool canToggleLineComment(TextRange range)

return true if can toggle line comments for specified text range

findPairedBracket
TextPosition findPairedBracket(TextPosition p)

returns paired bracket {} () [] for char at position p, returns paired char position or p if not found or not bracket

supportsSmartIndents
bool supportsSmartIndents()

returns true if smart indent is supported

toggleBlockComment
void toggleBlockComment(TextRange range, Object source)

toggle block comments for specified text range

toggleLineComment
void toggleLineComment(TextRange range, Object source)

toggle line comments for specified text range

updateHighlight
void updateHighlight(dstring[] lines, TokenPropString[] props, int changeStartLine, int changeEndLine)

categorize characters in content by token types

Properties

content
EditableContent content [@property getter]

returns editable content

content
EditableContent content [@property setter]

set editable content

supportsToggleBlockComment
bool supportsToggleBlockComment [@property getter]

return true if toggle block comment is supported for file type

supportsToggleLineComment
bool supportsToggleLineComment [@property getter]

return true if toggle line comment is supported for file type

Meta