{ "fileTypes": [ "gd" ], "scopeName": "source.gdscript", "name": "GDScript", "patterns": [ { "include": "#base_expression" }, { "include": "#self" }, { "include": "#logic_op" }, { "include": "#compare_op" }, { "include": "#arithmetic_op" }, { "include": "#assignment_op" }, { "include": "#keywords" }, { "include": "#const_def" }, { "include": "#var_def" }, { "include": "#class_def" }, { "match": "\\b(?i:export|tool)\\b", "name": "storage.modifier.static.gdscript" }, { "include": "#builtinFuncs" }, { "match": "\\b([A-Za-z_]\\w*)\\b(?=\\s*(?:[(]))", "name": "support.function.any-method.gdscript" }, { "match": "(?<=[^.]\\.)\\b([A-Za-z_]\\w*)\\b(?![(])", "name": "variable.other.property.gdscript" }, { "include": "#function-declaration" }, { "match": "(?<=extends)\\s+[a-zA-Z_][a-zA-Z_0-9]*(\\.([a-zA-Z_][a-zA-Z_0-9]*))?", "name": "entity.other.inherited-class.gdscript" }, { "include": "#builtinClasses" }, { "include": "#builtinProps" }, { "include": "#builtinConsts" }, { "include": "#const_vars" } ], "repository": { "comment": { "captures": { "1": { "name": "punctuation.definition.comment.number-sign.gdscript" } }, "match": "(#).*$\\n?", "name": "comment.line.number-sign.gdscript" }, "strings": { "patterns": [{ "begin": "\"", "end": "(?=|==|<|>|!=", "name": "keyword.operator.comparison.gdscript" }, "arithmetic_op": { "match": "\\+=|-=|\\*=|/=|%=|&=|\\|=|\\*|/|%|\\+|-|<<|>>|&|\\||\\^|~", "name": "keyword.operator.arithmetic.gdscript" }, "assignment_op": { "match": "=", "name": "keyword.operator.assignment.gdscript" }, "keywords": { "match": "\\b(?i:elif|else|for|if|while|break|continue|pass|in|is|return|onready|setget|enum|match|breakpoint|tool|extends|signal|class)\\b", "name": "keyword.control.gdscript" }, "letter": { "match": "\\b(?i:true|false|null)\\b", "name": "constant.language.gdscript" }, "numbers": { "patterns": [{ "match": "\\b(?i:0x\\h*)\\b", "name": "constant.numeric.integer.hexadecimal.gdscript" }, { "match": "\\b(?i:(\\d+\\.\\d*(e[\\-\\+]?\\d+)?))\\b", "name": "constant.numeric.float.gdscript" }, { "match": "\\b(?i:(\\.\\d+(e[\\-\\+]?\\d+)?))\\b", "name": "constant.numeric.float.gdscript" }, { "match": "\\b(?i:(\\d+e[\\-\\+]?\\d+))\\b", "name": "constant.numeric.float.gdscript" }, { "match": "\\b\\d+\\b", "name": "constant.numeric.integer.gdscript" } ] }, "const_def": { "match": "\\b(?i:(const))\\s+([a-zA-Z_][a-zA-Z_0-9]*)", "captures": { "1": { "name": "storage.type.const.gdscript" }, "2": { "name": "constant.other.gdscript" } } }, "var_def": { "match": "\\b(?i:(var))\\s+([a-zA-Z_][a-zA-Z_0-9]*)", "captures": { "1": { "name": "storage.type.var.gdscript" }, "2": { "name": "support.member.gdscript" } } }, "class_def": { "captures": { "1": { "name": "entity.name.type.class.gdscript" }, "2": { "name": "class.other.gdscript" } }, "match": "(?<=^class)\\s+([a-zA-Z_]\\w*)\\s*(?=:)" }, "builtin_func": { "match": "(?