{ "name": "Tact", "displayName": "Tact", "scopeName": "source.tact", "fileTypes": [ "tact" ], "foldingStartMarker": "\\{\\s*$", "foldingStopMarker": "^\\s*\\}", "patterns": [ { "include": "#comment" }, { "include": "#annotation" }, { "include": "#literal" }, { "include": "#invalid" }, { "include": "#constant" }, { "include": "#type" }, { "include": "#expression" }, { "include": "#punctuation" }, { "include": "#keyword" }, { "include": "#function" }, { "include": "#variable" } ], "repository": { "comment": { "patterns": [ { "name": "comment.line.double-slash.tact", "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.line.double-slash.tact" } }, "patterns": [ { "include": "#todo" } ], "end": "$" }, { "name": "comment.block.tact", "begin": "\\s*/\\*", "beginCaptures": { "0": { "name": "comment.block.begin.tact punctuation.definition.comment.begin.tact" } }, "patterns": [ { "include": "#todo" } ], "end": "\\*/", "endCaptures": { "0": { "name": "comment.block.end.tact punctuation.definition.comment.end.tact" } } } ] }, "todo": { "match": "\\b(FIXME|TODO|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG)\\b", "name": "keyword.comment.todo.tact" }, "annotation": { "patterns": [ { "comment": "@name() in native functions", "begin": "^\\s*(@name)\\s*(\\()", "beginCaptures": { "1": { "name": "entity.other.attribute-name.tact" }, "2": { "name": "punctuation.brackets.round.tact" } }, "patterns": [ { "comment": "FunC identifier", "match": "(.*?)", "name": "entity.name.function.func.tact" } ], "end": "\\)", "endCaptures": { "0": { "name": "punctuation.brackets.round.tact" } } }, { "comment": "One or more @inteface() before traits and contracts", "begin": "(?", "name": "keyword.operator.mapsto.tact" }, { "comment": "Decimal integer WITH leading zero", "match": "\\b(0[0-9]*)\\b", "name": "constant.numeric.decimal.tact" }, { "comment": "Decimal integer WITHOUT leading zero", "match": "\\b([1-9](?:_?[0-9])*)\\b", "name": "constant.numeric.decimal.tact" } ], "end": "\\)", "endCaptures": { "0": { "name": "punctuation.brackets.round.tact" } } }, { "comment": "Fallback match", "match": "(?", "begin": "(?", "endCaptures": { "0": { "name": "punctuation.brackets.angle.tact" } } }, { "comment": "map", "begin": "(?", "endCaptures": { "0": { "name": "punctuation.brackets.angle.tact" } } }, { "include": "#as-tlb" } ] }, "simple-type": { "comment": "Simple types", "match": "(?>)(?!=)", "name": "keyword.operator.bitwise.tact" }, { "comment": "Augmented assignment operators", "match": "(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)", "name": "keyword.operator.assignment.tact" }, { "comment": "Assignment operator", "match": "(?])=(?!=)", "name": "keyword.operator.assignment.equal.tact" }, { "comment": "Comparison operators", "match": "([!=]=|<=?|>=?)", "name": "keyword.operator.comparison.tact" }, { "comment": "Arithmetic operators", "match": "([+%*\\-])|(/(?!/))", "name": "keyword.operator.arithmetic.tact" }, { "comment": "initOf expression", "match": "\\b(initOf)\\b", "name": "keyword.operator.new.tact" }, { "comment": "Ternary expression", "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)", "beginCaptures": { "1": { "name": "keyword.operator.ternary.tact" } }, "patterns": [ { "include": "$self" } ], "end": "\\s*(:)", "endCaptures": { "1": { "name": "keyword.operator.ternary.tact" } } } ] }, "punctuation": { "patterns": [ { "match": ",", "name": "punctuation.comma.tact" }, { "match": "[{}]", "name": "punctuation.brackets.curly.tact" }, { "match": "[()]", "name": "punctuation.brackets.round.tact" }, { "match": ";", "name": "punctuation.semi.tact" }, { "match": ":", "name": "punctuation.colon.tact" }, { "match": "\\.", "name": "punctuation.dot.tact" } ] }, "keyword": { "patterns": [ { "match": "(?