class

Godot::CrystalHighlighter

Inherits Godot::EditorSyntaxHighlighter < Godot::SyntaxHighlighter < Godot::Resource < Godot::RefCounted < Godot::Object < Reference < Object

High-performance, zero-dependency Crystal syntax tokenizer and highlighter. Operates completely independently of any external language servers or daemons.

Constants

COLOR_ANNOTATION = {0.95_f32, 0.55_f32, 0.80_f32, 1.0_f32}
COLOR_COMMENT = {0.55_f32, 0.55_f32, 0.55_f32, 1.0_f32}
COLOR_CONTROL_FLOW = {0.95_f32, 0.40_f32, 0.40_f32, 1.0_f32}
COLOR_DEFAULT = {0.85_f32, 0.85_f32, 0.85_f32, 1.0_f32}

Theme color palettes for Godot's script editor

COLOR_KEYWORD = {0.85_f32, 0.45_f32, 0.90_f32, 1.0_f32}
COLOR_NUMBER = {0.95_f32, 0.65_f32, 0.30_f32, 1.0_f32}
COLOR_SPECIAL = {0.45_f32, 0.65_f32, 0.95_f32, 1.0_f32}
COLOR_STRING = {0.45_f32, 0.85_f32, 0.50_f32, 1.0_f32}
COLOR_SYMBOL = {0.30_f32, 0.85_f32, 0.90_f32, 1.0_f32}
COLOR_TYPE = {0.95_f32, 0.85_f32, 0.35_f32, 1.0_f32}
KEYWORDS_CONTROL = Set {"if", "else", "elsif", "unless", "while", "until", "for", "in", "case", "when", "then", "return", "break", "next", "yield", "begin", "rescue", "ensure", "raise", "do", "select"}
KEYWORDS_DEF = Set {"node", "resource", "gdclass", "class", "module", "struct", "def", "end", "property", "getter", "setter", "signal", "alias", "enum", "lib", "fun", "macro", "onready", "abstract_class", "static_unload"}
KEYWORDS_SPECIAL = Set {"self", "super", "nil", "true", "false", "as", "as?", "is_a?", "responds_to?", "sizeof", "instance_sizeof", "typeof", "require", "include", "extend", "spawn"}

Class methods

_godot_has_virtual_method(method_name : String) : Bool
Source
godot_class_name
Source
godot_parent_class_name
Source
highlight_line(line : String) : Array(SyntaxSpan)

Tokenizes a single line of Crystal source code into an array of SyntaxSpans

Source

Instance methods

_get_name
Source
_get_supported_languages
Source
_godot_call_tool_button(button_name : String) : Void

Dispatches inspector tool button clicks on this object.

Source
_godot_call_virtual(method_name : String, delta : Float64) : Void

Virtual method and property dispatch hooks overridden by class registration macros. Delta timestep is received with 64-bit precision (Float64).

Source
_godot_call_virtual_with_data(method_name : String, args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void

Dispatches generic virtual methods with raw arguments and return buffer.

Source
_godot_get_property(prop_name : String, ret_ptr : Pointer(Void)) : Void

Invoked by the GDExtension bridge when retrieving an exposed @export property.

Source
_godot_set_property(prop_name : String, val_ptr : Pointer(Void)) : Void

Invoked by the GDExtension bridge when setting an exposed @export property.

Source