{ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "name": "Lyng", "scopeName": "source.lyng", "fileTypes": ["lyng"], "patterns": [ { "include": "#shebang" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#char" }, { "include": "#numbers" }, { "include": "#declarations" }, { "include": "#keywords" }, { "include": "#constants" }, { "include": "#types" }, { "include": "#annotations" }, { "include": "#labels" }, { "include": "#directives" }, { "include": "#operators" }, { "include": "#punctuation" } ], "repository": { "shebang": { "patterns": [ { "name": "comment.line.shebang.lyng", "match": "^#!.*$" } ] }, "comments": { "patterns": [ { "name": "comment.line.double-slash.lyng", "match": "//.*$" }, { "name": "comment.block.lyng", "begin": "/\\*", "end": "\\*/" } ] }, "strings": { "patterns": [ { "name": "string.quoted.double.lyng", "begin": "\"", "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.lyng" } ] }, { "name": "string.quoted.single.lyng", "begin": "'", "end": "'", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.lyng" } ] } ] }, "char": { "patterns": [ { "name": "constant.character.lyng", "match": "'(?:[^\\\\']|\\\\.)'" } ] }, "numbers": { "patterns": [ { "name": "constant.numeric.hex.lyng", "match": "0x[0-9A-Fa-f_]+" }, { "name": "constant.numeric.decimal.lyng", "match": "(?=|<|>" }, { "name": "keyword.operator.shuttle.lyng", "match": "<=>" }, { "name": "keyword.operator.arrow.lyng", "match": "=>|->|::" }, { "name": "keyword.operator.range.lyng", "match": "\\.\\.\\.|\\.\\.<|\\.\\." }, { "name": "keyword.operator.nullsafe.lyng", "match": "\\?\\.|\\?\\[|\\?\\(|\\?\\{|\\?:|\\?\\?" }, { "name": "keyword.operator.assignment.lyng", "match": "(?:\\+=|-=|\\*=|/=|%=|=)" }, { "name": "keyword.operator.logical.lyng", "match": "&&|\\|\\|" }, { "name": "keyword.operator.bitwise.lyng", "match": "<<|>>|&|\\||\\^|~" }, { "name": "keyword.operator.match.lyng", "match": "=~|!~" }, { "name": "keyword.operator.arithmetic.lyng", "match": "\\+\\+|--|[+\\-*/%]" }, { "name": "keyword.operator.other.lyng", "match": "[!?]" } ] }, "punctuation": { "patterns": [ { "name": "punctuation.separator.comma.lyng", "match": "," }, { "name": "punctuation.terminator.statement.lyng", "match": ";" }, { "name": "punctuation.section.block.begin.lyng", "match": "[(]{1}|[{]{1}|\\[" }, { "name": "punctuation.section.block.end.lyng", "match": "[)]{1}|[}]{1}|\\]" }, { "name": "punctuation.accessor.dot.lyng", "match": "\\." }, { "name": "punctuation.separator.colon.lyng", "match": ":" } ] } } }