{ "comment": "\n\t\t\thttps://github.com/abusalimov/SublimeCImproved\n\n\t\t\tDerived from C.tmLanguage - the original TextMate and Sublime Text\n\t\t\tsyntax definition.\n\n\t\t\tThe MIT License (MIT)\n\n\t\t\tCopyright (c) 2013-2014 Eldar Abusalimov\n\t\t\tModified for the Pawn Language by Sergei Marochkin 2016\n\n\t\t\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\t\t\tthis software and associated documentation files (the \"Software\"), to deal in\n\t\t\tthe Software without restriction, including without limitation the rights to\n\t\t\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n\t\t\tthe Software, and to permit persons to whom the Software is furnished to do so,\n\t\t\tsubject to the following conditions:\n\n\t\t\tThe above copyright notice and this permission notice shall be included in all\n\t\t\tcopies or substantial portions of the Software.\n\n\t\t\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t\t\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n\t\t\tFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n\t\t\tCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n\t\t\tIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n\t\t\tCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t", "fileTypes": [ "p", "pwn", "inc" ], "firstLineMatch": "-[*]-( Mode:)? C -[*]-", "foldingStartMarker": "(?x)\n\t\t /\\*\\*(?!\\*)\n\t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\t", "foldingStopMarker": "(?)}\\]] ) ) \\s*\n\n\t\t\t\t( (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?: (?<= ^ operator | \\W operator ) # C++ operator?\n\t\t\t\t (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? )\n\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ (?'parens' \\(\n\t\t\t\t (?> \\g'parens' |\n\t\t\t\t \t\"(\\\\.|[^\"])*\" | '(\\\\.|[^'])*' | /\\*.*?\\*/ |\n\t\t\t\t \t(?! /[/*] | [()] ) . )*\n\t\t\t\t \\) ) \\s* ; )\n\t\t\t", "beginCaptures": { "1": { "name": "entity.name.function.declaration.c" } }, "end": ";", "patterns": [ { "include": "#lex" }, { "include": "#parens" } ] }, "function-definition": { "name": "meta.function.c", "begin": "(?x)\n\t\t\t\t(?: ^\n\t\t\t\t | (?)}\\]\\:] ) ) \\s*\n\n\t\t\t\t( (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?: (?<= ^ operator | \\W operator ) # C++ operator?\n\t\t\t\t (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? )\n\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t", "beginCaptures": { "1": { "name": "entity.name.function.definition.c" } }, "end": "\\}|;", "patterns": [ { "include": "#lex" }, { "include": "#parens" }, { "match": "\\s*\\b(const|override)\\b", "name": "storage.modifier.c" }, { "include": "#block-lookahead-end" } ] }, "call": { "name": "meta.function-call.c", "begin": "(?x)\n\t\t\t\t\\s*\n\t\t\t\t(?= # don't consume to recognize support functions\n\t\t\t\t (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t", "end": "\\)", "patterns": [ { "include": "#lex" }, { "match": "(?:(?<=\\.)|(?<=->))\\b([A-Za-z_]\\w*+)\\b", "name": "variable.other.dot-access.c support.function.any-method.c" }, { "match": "(?:[A-Za-z_]\\w*+|::[^:])++", "name": "support.function.any-method.c" }, { "include": "#parens-lookahead-end" } ] }, "preprocessor": { "begin": "(?=^\\s*(#))", "end": "(?!^\\s*(#))", "patterns": [ { "include": "#ppline-directive-invalid-usage" }, { "include": "#ppline-macro" }, { "include": "#ppline-undef" }, { "include": "#ppline-pragma-mark" }, { "include": "#ppline-include" }, { "include": "#ppline-error" }, { "include": "#ppline-directive" }, { "include": "#ppline-directive-obsolete" }, { "include": "#ppline-directive-emit" }, { "include": "#ppline-invalid" }, { "include": "#ppline-any" } ] }, "preprocessor-lex": { "patterns": [ { "include": "#comments" }, { "include": "#lex-continuation" }, { "include": "#lex-newline" } ] }, "ppline-macro": { "begin": "^\\s*(#)(?=\\s*(define)\\s+[a-zA-Z_]\\w*+)", "beginCaptures": { "0": { "name": "keyword.other.preprocessor.c" } }, "end": "(?<=$\\n)(?(?:\\\\\\s*)?$\\n?) | /[/*] ) )\n\t\t\t\t\t\t .)*\n\t\t\t\t\t", "name": "invalid.illegal.unexpected-character.c" } ] }, "ppline-macro-param-vararg": { "begin": "(\\.\\.\\.)", "beginCaptures": { "1": { "name": "punctuation.definition.ellipsis.c" } }, "end": "(\\))|(?=(?<=^|[^\\\\])\\s*(\\n))", "patterns": [ { "include": "#ppline-macro-param-lex" }, { "match": "(?x)\n\t\t\t\t\t\t(?: (?! (?:\\s|/\\*.*?\\*/)*+\n\t\t\t\t\t\t\t (?: \\) | (?>(?:\\\\\\s*)?$\\n?) | /[/*] ) )\n\t\t\t\t\t\t .)*\n\t\t\t\t\t", "name": "invalid.illegal.unexpected-character.c" } ] }, "ppline-macro-param-lex": { "patterns": [ { "match": "\\s*" }, { "begin": "\\s*//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.c" } }, "end": "(?<=^|[^\\\\])\\s*(?=\\n)$", "name": "invalid.illegal.unexpected-end-of-line.c", "patterns": [ { "include": "#lex-continuation" } ] }, { "include": "#preprocessor-lex" } ] }, "ppline-macro-param-lex-invalid": { "patterns": [ { "match": "(?x)\n\t\t\t\t\t\t(?: (?! (?:\\s|/\\*.*?\\*/)*+\n\t\t\t\t\t\t (?: \\) | (?>(?:\\\\\\s*)?$\\n?) | /[/*] ) )\n\t\t\t\t\t\t .) # no star unlike its friends in arg/vararg\n\t\t\t\t\t", "name": "invalid.illegal.unexpected-character.c" } ] }, "ppline-undef": { "begin": "(^\\s*(#)\\s*(undef))\\s+([a-zA-Z_]\\w*+)", "beginCaptures": { "1": { "name": "keyword.other.preprocessor.c" }, "4": { "name": "variable.macro.undef.c" } }, "end": "(?<=$\\n)(?]*?))(\\n)|(?<=$\\n)(?)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.c" } }, "end": ">|(?<=^|[^\\\\])(?=\\s*\\n)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.c" } }, "name": "string.quoted.other.lt-gt.include.c" }, { "begin": "\\(", "end": "\\)|(?<=^|[^\\\\])(?=\\s*\\n)", "name": "meta.parens.c", "patterns": [ { "include": "#ppline-include-innards" } ] } ] }, "ppline-error": { "begin": "^\\s*(#)\\s*(error|warning)\\b", "beginCaptures": { "0": { "name": "keyword.other.preprocessor.include.c" } }, "end": "(.*)|(?<=$\\n)(?\\\\\\s*\\n)|\\n|$))\\s*(\\w*)", "end": "(?<=$\\n)(?>)?=", "name": "keyword.operator.assignment.c" }, { "match": "(==|!=|<=|>=|<>|<|>)", "name": "keyword.operator.comparison.c" }, { "match": "(\\-\\-|\\+\\+)", "name": "keyword.operator.increment-decrement.c" }, { "match": "(\\?|:)", "name": "keyword.operator.ternary.c" }, { "match": "(\\-|\\+|\\*|\\/|%)", "name": "keyword.operator.arithmetic.c" }, { "match": "(!|&&|\\|\\|)", "name": "keyword.operator.logical.c" }, { "match": "(~|&|\\||\\^|<<|>>)", "name": "keyword.operator.bitwise.c" } ] }, "lex-constant": { "patterns": [ { "match": "\\s*\\b(true|false|TRUE|FALSE)\\b", "captures": { "1": { "name": "constant.language.c" } } } ] }, "lex-number": { "patterns": [ { "match": "([0-9]+)(\\.{2})([0-9]+)", "captures": { "1": { "name": "constant.numeric.integer.decimal.c" }, "2": { "name": "keyword.operator.switch-range.c" }, "3": { "name": "constant.numeric.integer.decimal.c" } } }, { "match": "(?ix) # hexadecimal float\n\t\t\t\t\t\t(?