{ "name": "Pascal", "scopeName": "source.pascal", "patterns": [ { "name": "keyword.control.pascal", "match": "\\b(?i:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|downto|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|generic|goto|helper|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|specialize|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b" }, { "name": "meta.function.prototype.pascal", "match": "\\b(?i:(function|procedure))\\b\\s+(\\w+(\\.\\w+)?)(\\(.*?\\))?;\\s*(?=(?i:attribute|forward|external))", "captures": { "1": { "name": "storage.type.prototype.pascal" }, "2": { "name": "entity.name.function.prototype.pascal" } } }, { "name": "meta.function.pascal", "match": "\\b(?i:(function|procedure))\\b\\s+(\\w+(\\.\\w+)?)", "captures": { "1": { "name": "storage.type.function.pascal" }, "2": { "name": "entity.name.function.pascal" } } }, { "name": "constant.numeric.pascal", "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" }, { "begin": "(^[ \\t]+)?(?=--)", "end": "(?!\\G)", "patterns": [ { "name": "comment.line.double-dash.pascal.one", "begin": "--", "end": "\\n", "beginCaptures": { "0": { "name": "punctuation.definition.comment.pascal" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.pascal" } } }, { "begin": "(^[ \\t]+)?(?=//)", "end": "(?!\\G)", "patterns": [ { "name": "comment.line.double-slash.pascal.two", "begin": "//", "end": "\\n", "beginCaptures": { "0": { "name": "punctuation.definition.comment.pascal" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.pascal" } } }, { "name": "comment.block.pascal.one", "begin": "\\(\\*", "end": "\\*\\)", "captures": { "0": { "name": "punctuation.definition.comment.pascal" } } }, { "name": "comment.block.pascal.two", "begin": "\\{", "end": "\\}", "captures": { "0": { "name": "punctuation.definition.comment.pascal" } } }, { "name": "string.quoted.double.pascal", "begin": "\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.pascal", "match": "\\\\." } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.pascal" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.pascal" } } }, { "name": "string.quoted.single.pascal", "begin": "'", "end": "'", "patterns": [ { "name": "constant.character.escape.apostrophe.pascal", "match": "''" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.pascal" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.pascal" } }, "applyEndPatternLast": true } ] }