2 lines
6.2 KiB
JavaScript
2 lines
6.2 KiB
JavaScript
|
|
const e=Object.freeze(JSON.parse('{"displayName":"GDShader","fileTypes":["gdshader"],"name":"gdshader","patterns":[{"include":"#any"}],"repository":{"any":{"patterns":[{"include":"#comment"},{"include":"#enclosed"},{"include":"#classifier"},{"include":"#definition"},{"include":"#keyword"},{"include":"#element"},{"include":"#separator"},{"include":"#operator"}]},"arraySize":{"begin":"\\\\[","captures":{"0":{"name":"punctuation.bracket.gdshader"}},"end":"\\\\]","name":"meta.array-size.gdshader","patterns":[{"include":"#comment"},{"include":"#keyword"},{"include":"#element"},{"include":"#separator"}]},"classifier":{"begin":"(?=\\\\b(?:shader_type|render_mode)\\\\b)","end":"(?<=;)","name":"meta.classifier.gdshader","patterns":[{"include":"#comment"},{"include":"#keyword"},{"include":"#identifierClassification"},{"include":"#separator"}]},"classifierKeyword":{"match":"\\\\b(?:shader_type|render_mode)\\\\b","name":"keyword.language.classifier.gdshader"},"comment":{"patterns":[{"include":"#commentLine"},{"include":"#commentBlock"}]},"commentBlock":{"begin":"/\\\\*","end":"\\\\*/","name":"comment.block.gdshader"},"commentLine":{"begin":"//","end":"$","name":"comment.line.double-slash.gdshader"},"constantFloat":{"match":"\\\\b(?:E|PI|TAU)\\\\b","name":"constant.language.float.gdshader"},"constructor":{"match":"\\\\b[a-zA-Z_]\\\\w*(?=\\\\s*\\\\[\\\\s*\\\\w*\\\\s*\\\\]\\\\s*[(])|\\\\b[A-Z]\\\\w*(?=\\\\s*[(])","name":"entity.name.type.constructor.gdshader"},"controlKeyword":{"match":"\\\\b(?:if|else|do|while|for|continue|break|switch|case|default|return|discard)\\\\b","name":"keyword.control.gdshader"},"definition":{"patterns":[{"include":"#structDefinition"}]},"element":{"patterns":[{"include":"#literalFloat"},{"include":"#literalInt"},{"include":"#literalBool"},{"include":"#identifierType"},{"include":"#constructor"},{"include":"#processorFunction"},{"include":"#identifierFunction"},{"include":"#swizzling"},{"include":"#identifierField"},{"include":"#constantFloat"},{"include":"#languageVariable"},{"include":"#identifierVariable"}]},"enclosed":{"begin":"\\\\(","captures":{"0":{"name":"punctuation.parenthesis.gdshader"}},"end":"\\\\)","name":"meta.parenthesis.gdshader","patterns":[{"include":"#any"}]},"fieldDefinition":{"begin":"\\\\b[a-zA-Z_]\\\\w*\\\\b","beginCaptures":{"0":{"patterns":[{"include":"#typeKeyword"},{"match":".+","name":"entity.name.type.gdshader"}]}},"end":"(?<=;)","name":"meta.definition.field.gdshader","patterns":[{"include":"#comment"},{"include":"#keyword"},{"include":"#arraySize"},{"include":"#fieldName"},{"include":"#any"}]},"fieldName":{"match":"\\\\b[a-zA-Z_]\\\\w*\\\\b","name":"entity.name.variable.field.gdshader"},"hintKeyword":{"match":"\\\\b(?:source_color|hint_(?:color|range|(?:black_)?albedo|normal|(?:default_)?(?:white|black)|aniso|anisotropy|roughness_(?:[rgba]|normal|gray))|filter_(?:nearest|linear)(?:_mipmap(?:_anisotropic)?)?|repeat_(?:en|dis)able)\\\\b","name":"support.type.annotation.gdshader"},"identifierClassification":{"match":"\\\\b[a-z_]+\\\\b","name":"entity.other.inherited-class.gdshader"},"identifierField":{"captures":{"1":{"name":"punctuation.accessor.gdshader"},"2":{"name":"entity.name.variable.field.gdshader"}},"match":"([.])\\\\s*([a-zA-Z_]\\\\w*)\\\\b(?!\\\\s*\\\\()"},"identifierFunction":{"match":"\\\\b[a-zA-Z_]\\\\w*(?=(?:\\\\s|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*[(])","name":"entity.name.function.gdshader"},"identifierType":{"match":"\\\\b[a-zA-Z_]\\\\w*(?=(?:\\\\s*\\\\[\\\\s*\\\\w*\\\\s*\\\\])?\\\\s+[a-zA-Z_]\\\\w*\\\\b)","name":"entity.name.type.gdshader"},"identifierVariable":{"match":"\\\\b[a-zA-Z_]\\\\w*\\\\b","name":"variable.name.gdshader"},"keyword":{"patterns":[{"include":"#classifierKeyword"},{"include":"#structKeyword"},{"include":"#controlKeyword"},{"include":"#modifierKeyword"},{"include":"#precisionKeyword"},{"include":"#typeKeyword"},{"include":"#hintKeyword"}]},"languageVariable":{"match":"\\\\b(?:[A-Z][A-Z_0-9]*)\\\\b","name":"variable.language.gdshader"},"literalBool":{"match":"\\\\b(?:false|true)\\\\b","name":"constant.language.boolean.gdshader"},"literalFloat"
|