SyntaxHighlighter
Base class for syntax highlighters. Provides syntax highlighting data to a TextEdit
.
class SyntaxHighlighter
Base class for syntax highlighters. Provides syntax highlighting data to a TextEdit
. The associated TextEdit
will call into the SyntaxHighlighter
on an as-needed basis.
Superclasses
class Resource
Base class for serializable objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
func clearHighlightingCache(
) Clears all cached syntax highlighting data.
func getLineSyntaxHighlighting(line: Int32
) -> GDictionary Returns syntax highlighting data for a single line. If the line is not cached, calls
_getLineSyntaxHighlighting(line:)
to calculate the data.func getTextEdit(
) -> TextEdit? Returns the associated
TextEdit
node.func updateCache(
) Clears then updates the
SyntaxHighlighter
caches. Override_updateCache
for a callback.
Show implementation details (3)
Hide implementation details
func _clearHighlightingCache(
) Virtual method which can be overridden to clear any local caches.
func _getLineSyntaxHighlighting(line: Int32
) -> GDictionary Virtual method which can be overridden to return syntax highlighting data.
func _updateCache(
) Virtual method which can be overridden to update any local caches.
Subclasses
class CodeHighlighter
A syntax highlighter intended for code.
class EditorSyntaxHighlighter
Base class for
SyntaxHighlighter
used by theScriptEditor
.