{ "name": "BlitzMax", "scopeName": "source.blitzmax", "patterns": [ { "name": "punctuation.terminator.line.blitzmax", "match": ";" }, { "include": "#bmax_comment_quote" }, { "include": "#bmax_comment_block" }, { "include": "#bmax_global_variable" }, { "include": "#bmax_local_variable" }, { "include": "#bmax_constant" }, { "include": "#bmax_pointerops" }, { "include": "#bmax_preprocessor" }, { "include": "#bmax_attributes" }, { "name": "meta.try.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(try)\\b", "end": "(?i)\\b(end\\s?try)\\b", "patterns": [ { "name": "keyword.control.try.catch.blitzmax", "match": "(?i)^\\s*(catch)" }, { "include": "$self" } ], "beginCaptures": { "1": { "name": "keyword.control.try.blitzmax" } }, "endCaptures": { "1": { "name": "keyword.control.try.blitzmax" } } }, { "name": "meta.extern.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(extern)(?:\\s+((\")[^\"]*(\"))|\\b)", "end": "(?i)(?:(?:^|;)\\s*)\\b(end\\s?extern)\\b", "patterns": [ { "include": "#bmax_comment_quote" }, { "include": "#bmax_comment_block" }, { "include": "#bmax_pointerops" }, { "include": "#bmax_constants" }, { "include": "#bmax_null" }, { "include": "#bmax_typename" }, { "include": "#bmax_types" }, { "include": "#bmax_array" }, { "include": "#bmax_string_quoted" }, { "include": "#bmax_global_variable" }, { "include": "#bmax_constant" }, { "include": "#bmax_preprocessor" }, { "name": "meta.function.extern.blitzmax", "match": "(?i)(?:(?:^|;)\\s*)(function)\\s+([a-zA-Z_]\\w*)\\b", "captures": { "1": { "name": "storage.type.function.extern.blitzmax" }, "2": { "name": "entity.name.function.extern.blitzmax" } } }, { "name": "meta.type.extern.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(type)\\s+([a-zA-Z_]\\w*)(?:\\s+(extends)\\s+([a-zA-Z_]\\w*))?", "end": "(?i)\\b(end\\s?type)\\b", "patterns": [ { "name": "meta.method.blitzmax", "match": "(?i)(?:(?:^|;)\\s*)(method)\\s+([a-zA-Z_]\\w*)\\b", "captures": { "1": { "name": "storage.type.method.method.extern.blitzmax" }, "2": { "name": "entity.name.function.method.extern.blitzmax" } } }, { "include": "#bmax_comment_quote" }, { "include": "#bmax_comment_block" }, { "include": "#bmax_pointerops" }, { "include": "#bmax_string_quoted" }, { "include": "#bmax_constants" }, { "include": "#bmax_null" }, { "include": "#bmax_typename" }, { "include": "#bmax_types" }, { "include": "#bmax_array" }, { "include": "#bmax_type_field" }, { "include": "#bmax_preprocessor" } ], "beginCaptures": { "1": { "name": "storage.type.class.extern.blitzmax" }, "2": { "name": "entity.name.type.extern.blitzmax" }, "3": { "name": "storage.modifier.extends.extern.blitzmax" }, "4": { "name": "entity.other.inherited-class.extern.blitzmax" } }, "endCaptures": { "1": { "name": "storage.type.class.extern.blitzmax" } } } ], "beginCaptures": { "1": { "name": "keyword.other.extern.blitzmax" }, "2": { "name": "string.quoted.double.blitzmax" }, "3": { "name": "punctuation.definition.string.begin.blitzmax" }, "4": { "name": "punctuation.definition.string.end.blitzmax" } }, "endCaptures": { "1": { "name": "keyword.other.extern.blitzmax" } } }, { "include": "#bmax_function" }, { "name": "meta.import.module.blitzmax", "match": "(?i)\\b(import)\\s+((?:[a-zA-Z_]\\w*\\.?)+)", "captures": { "1": { "name": "keyword.other.import.blitzmax" }, "2": { "name": "string.unquoted.module.blitzmax" } } }, { "name": "meta.import.file.blitzmax", "contentName": "string.quoted.double.blitzmax", "begin": "(?i)\\b(import)\\s+((\"))", "end": "(\")", "patterns": [ { "include": "#bmax_string_content" } ], "beginCaptures": { "1": { "name": "keyword.other.import.blitzmax" }, "2": { "name": "punctuation.definition.string.begin.blitzmax" }, "3": { "name": "string.quoted.double.blitzmax" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.blitzmax" }, "1": { "name": "string.quoted.double.blitzmax" } } }, { "name": "meta.framework.blitzmax", "match": "(?i)\\b(framework)\\s+((?:[a-zA-Z_]\\w*\\.?)+)", "captures": { "1": { "name": "keyword.other.framework.blitzmax" }, "2": { "name": "string.unquoted.module.blitzmax" } } }, { "name": "meta.module.blitzmax", "match": "(?i)\\b(module)\\s+(([a-zA-Z_]\\w*\\.?)+)", "captures": { "1": { "name": "keyword.other.module.blitzmax" }, "2": { "name": "string.unquoted.module.blitzmax" } } }, { "name": "meta.include.blitzmax", "contentName": "string.quoted.double.blitzmax", "begin": "(?i)\\b(include)\\s+((\"))", "end": "(\")", "patterns": [ { "include": "#bmax_string_content" } ], "beginCaptures": { "1": { "name": "keyword.other.include.blitzmax" }, "2": { "name": "punctuation.definition.string.begin.blitzmax" }, "3": { "name": "string.quoted.double.blitzmax" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.blitzmax" }, "1": { "name": "string.quoted.double.blitzmax" } } }, { "name": "meta.incbin.blitzmax", "contentName": "string.quoted.double.blitzmax", "begin": "(?i)\\b(incbin)\\s+((\"))", "end": "(\")", "patterns": [ { "include": "#bmax_string_content" } ], "beginCaptures": { "1": { "name": "keyword.other.incbin.blitzmax" }, "2": { "name": "punctuation.definition.string.begin.blitzmax" }, "3": { "name": "string.quoted.double.blitzmax" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.blitzmax" }, "1": { "name": "string.quoted.double.blitzmax" } } }, { "name": "meta.moduleinfo.blitzmax", "contentName": "string.quoted.double.blitzmax", "begin": "(?i)\\b(moduleinfo)\\s+((\"))", "end": "(\")", "patterns": [ { "include": "#bmax_string_content" } ], "beginCaptures": { "1": { "name": "keyword.other.moduleinfo.blitzmax" }, "2": { "name": "punctuation.definition.string.begin.blitzmax" }, "3": { "name": "string.quoted.double.blitzmax" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.blitzmax" }, "1": { "name": "string.quoted.double.blitzmax" } } }, { "name": "meta.type.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(type)\\s+([a-zA-Z_]\\w*)(?:\\s+(extends)\\s+([a-zA-Z_]\\w*))?(?:\\s+(final|abstract))?", "end": "(?i)\\b(end\\s?type)\\b", "patterns": [ { "name": "meta.method.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(method)\\s+([a-zA-Z_]\\w*)", "end": "(?i)(?:\\)\\s+(abstract)\\s*)$|\\b(end\\s?method)\\b", "patterns": [ { "include": "$self" }, { "name": "storage.modifier.method.final.blitzmax", "match": "(?i)\\bfinal\\b" } ], "beginCaptures": { "1": { "name": "storage.type.method.blitzmax" }, "2": { "name": "entity.name.function.method.blitzmax" } }, "endCaptures": { "1": { "name": "storage.modifier.abstract.blitzmax" }, "2": { "name": "storage.type.method.blitzmax" } } }, { "include": "#bmax_comment_quote" }, { "include": "#bmax_comment_block" }, { "include": "#bmax_constants" }, { "include": "#bmax_string_quoted" }, { "include": "#bmax_attributes" }, { "include": "#bmax_pointerops" }, { "include": "#bmax_null" }, { "include": "#bmax_types" }, { "include": "#bmax_typename" }, { "include": "#bmax_global_variable" }, { "include": "#bmax_constant" }, { "include": "#bmax_function" }, { "include": "#bmax_type_field" }, { "include": "#bmax_constructor" }, { "include": "#bmax_preprocessor" } ], "beginCaptures": { "1": { "name": "storage.type.class.blitzmax" }, "2": { "name": "entity.name.type.blitzmax" }, "3": { "name": "storage.modifier.extends.blitzmax" }, "4": { "name": "entity.other.inherited-class.blitzmax" }, "5": { "name": "storage.modifier.class.blitzmax" } }, "endCaptures": { "1": { "name": "storage.type.class.blitzmax" } } }, { "name": "keyword.control.if.blitzmax", "match": "(?i)\\b((end\\s?|else\\s?)?(if)|else|then)\\b" }, { "include": "#bmax_control_keywords" }, { "name": "meta.control.while.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(while)\\b", "end": "(?i)(?:(?:^|;)\\s*)(end\\s?while|wend)\\b", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "keyword.control.while.blitzmax" } }, "endCaptures": { "1": { "name": "keyword.control.while.end.blitzmax" } } }, { "name": "meta.control.for.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(for)\\b", "end": "(?i)(?:(?:^|;)\\s*)(next)\\b", "patterns": [ { "name": "keyword.control.for.eachin.blitzmax", "match": "(?i)\\beachin\\b" }, { "name": "keyword.control.for.to.blitzmax", "match": "(?i)\\bto\\b" }, { "name": "keyword.control.for.until.blitzmax", "match": "(?i)\\buntil\\b" }, { "name": "keyword.control.for.step.blitzmax", "match": "(?i)\\bstep\\b" }, { "include": "$self" } ], "beginCaptures": { "1": { "name": "keyword.control.for.blitzmax" } }, "endCaptures": { "1": { "name": "keyword.control.for.end.blitzmax" } } }, { "name": "meta.control.repeat.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(repeat)\\b", "end": "(?i)(?:(?:^|;)\\s*)(until|forever)\\b", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "keyword.control.repeat.blitzmax" } }, "endCaptures": { "1": { "name": "keyword.control.repeat.end.blitzmax" } } }, { "name": "meta.control.select.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(select)\\b", "end": "(?i)(?:(?:^|;)\\s*)(end\\s?select)\\b", "patterns": [ { "name": "meta.control.select.case.blitzmax", "match": "(?i)(?:(?:^|;)\\s*)(case)\\b", "captures": { "1": { "name": "keyword.control.select.case.blitzmax" } } }, { "name": "meta.control.select.default.blitzmax", "match": "(?i)(?:(?:^|;)\\s*)(default)\\b", "captures": { "1": { "name": "keyword.control.select.default.blitzmax" } } }, { "include": "$self" } ], "beginCaptures": { "1": { "name": "keyword.control.select.blitzmax" } }, "endCaptures": { "1": { "name": "keyword.control.select.end.blitzmax" } } }, { "name": "keyword.operator.blitzmax", "match": "(?i)\\b(mod|shr|shl|sar|and|or|not)\\b" }, { "name": "keyword.operator.blitzmax", "match": ":?[\\^+\\-=\u0026|\u003e\u003c]" }, { "name": "keyword.other.scope.blitzmax", "match": "(?i)\\b(private|public)\\b" }, { "name": "keyword.other.strictness.blitzmax", "match": "(?i)\\b(strict|superstrict)\\b" }, { "include": "#bmax_null" }, { "include": "#bmax_types" }, { "include": "#bmax_constants" }, { "include": "#bmax_string_quoted" }, { "name": "variable.language.self.blitzmax", "match": "(?i)\\b(self)\\b" }, { "name": "variable.language.super.blitzmax", "match": "(?i)\\b(super)\\b" }, { "include": "#bmax_constructor" }, { "include": "#bmax_array" }, { "include": "#bmax_typename" } ], "repository": { "bmax_array": { "name": "meta.array.blitzmax", "begin": "(\\[)", "end": "(\\])", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "keyword.operator.array.blitzmax" } }, "endCaptures": { "1": { "name": "keyword.operator.array.blitzmax" } } }, "bmax_attributes": { "name": "meta.attributes.blitzmax", "begin": "(\\{)", "end": "(\\})", "patterns": [ { "name": "meta.attribute.blitzmax", "begin": "\\b([a-zA-Z_]\\w*)\\s*(=)\\s*", "end": "(?=\\s|\\}|[a-zA-Z_])", "patterns": [ { "include": "#bmax_string_quoted" }, { "include": "#bmax_numbers" } ], "beginCaptures": { "1": { "name": "entity.other.attribute-name.blitzmax" } } }, { "name": "meta.attribute.blitzmax", "match": "\\b([a-zA-Z_]\\w*)(?:\\s*((?!=)|(?=\\})))", "captures": { "1": { "name": "entity.other.attribute-name.blitzmax" } } } ], "beginCaptures": { "1": { "name": "storage.modifier.attributes.braces.blitzmax" } }, "endCaptures": { "1": { "name": "storage.modifier.attributes.braces.blitzmax" } } }, "bmax_boolean": { "name": "constant.language.boolean.blitzmax", "match": "(?i)\\b(true|false)\\b" }, "bmax_comment_block": { "name": "comment.block.rem.blitzmax", "begin": "(?i)(?\u003c=\\s|^|;)(?\u003c!end|end\\s)rem\\b", "end": "(?i)(?\u003c=\\s|^|;)end\\s?rem\\b", "patterns": [ { "include": "#bmax_url_content" } ] }, "bmax_comment_quote": { "name": "comment.line.apostrophe.blitzmax", "begin": "'", "end": "$", "patterns": [ { "include": "#bmax_url_content" } ] }, "bmax_constant": { "name": "meta.constant.blitzmax", "match": "(?i)\\b(const)\\b", "captures": { "1": { "name": "keyword.other.constant.blitzmax" } } }, "bmax_constants": { "patterns": [ { "include": "#bmax_pi" }, { "include": "#bmax_boolean" }, { "include": "#bmax_numbers" } ] }, "bmax_constructor": { "name": "meta.call.constructor.blitzmax", "match": "(?i)\\b(new)\\s+([a-zA-Z_]\\w*)\\b", "captures": { "1": { "name": "keyword.other.new.blitzmax" }, "2": { "name": "storage.type.class.blitzmax" } } }, "bmax_control_keywords": { "name": "keyword.control.blitzmax", "match": "(?i)\\b(throw|return|exit|continue)\\b" }, "bmax_function": { "name": "meta.function.blitzmax", "begin": "(?i)(?:(?:^|;)\\s*)(function)\\s+([a-zA-Z_]\\w*)\\b", "end": "(?i)\\b(end\\s?function)\\b", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "storage.type.function.blitzmax" }, "2": { "name": "entity.name.function.blitzmax" } }, "endCaptures": { "1": { "name": "storage.type.function.blitzmax" } } }, "bmax_global_variable": { "name": "meta.variable.blitzmax", "match": "(?i)\\b(global)\\b", "captures": { "1": { "name": "storage.modifier.global.blitzmax" } } }, "bmax_local_variable": { "name": "meta.variable.blitzmax", "match": "(?i)\\b(local)\\b", "captures": { "1": { "name": "keyword.other.variable.local.blitzmax" } } }, "bmax_null": { "name": "constant.language.null.blitzmax", "match": "(?i)\\bnull\\b" }, "bmax_numbers": { "patterns": [ { "name": "constant.numeric.integer.hexadecimal.blitzmax", "match": "(\\$[0-9a-fA-F]{1,16})" }, { "name": "constant.numeric.integer.binary.blitzmax", "match": "(\\%[01]{1,128})" }, { "name": "constant.numeric.float.blitzmax", "match": "(?x) (?\u003c! % | \\$ ) (\n\t\t\t\t\t\t\t\\b ([0-9]+ \\. [0-9]+) |\n\t\t\t\t\t\t\t(\\. [0-9]+)\n\t\t\t\t\t\t)" }, { "name": "constant.numeric.integer.blitzmax", "match": "(?x)\\b(([0-9]+))" } ] }, "bmax_pi": { "name": "constant.language.blitzmax", "match": "(?i)\\bpi\\b" }, "bmax_pointerops": { "name": "meta.pointerops.blitzmax", "match": "(?i)\\b(?:(ptr|var)|(varptr))\\b", "captures": { "1": { "name": "storage.modifier.blitzmax" }, "2": { "name": "keyword.operator.blitzmax" } } }, "bmax_preprocessor": { "name": "keyword.control.preprocessor.blitzmax", "match": "(?i)^\\s*\\?(not\\s+)?\\w*" }, "bmax_string_content": { "patterns": [ { "name": "constant.character.escape.blitzmax", "match": "\\~[^\"]" }, { "include": "#bmax_url_content" } ] }, "bmax_string_quoted": { "name": "string.quoted.double.blitzmax", "begin": "\"", "end": "\"", "patterns": [ { "include": "#bmax_string_content" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.blitzmax" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.blitzmax" } } }, "bmax_type_field": { "name": "meta.variable.field.blitzmax", "match": "(?i)\\b(field)\\b", "captures": { "1": { "name": "keyword.other.variable.field.blitzmax" } } }, "bmax_typename": { "name": "meta.typename.blitzmax", "match": "(?xi)(?: \\: \\s* ([a-zA-Z_]\\w*) | ([!#%]|@{1,2}|\\$[zw]?) )", "captures": { "1": { "name": "storage.type.blitzmax" }, "2": { "name": "storage.type.blitzmax" } } }, "bmax_types": { "name": "storage.type.blitzmax", "match": "(?i)\\b(object|string|byte|short|int|long|float|double)\\b" }, "bmax_url_content": { "name": "meta.url.blitzmax", "match": "[a-zA-Z_]\\w*://[^ \"'()\\[\\]]*(?=$|\\b)" } } }