|
| 1 | +{ |
| 2 | + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", |
| 3 | + "name": "Tony", |
| 4 | + "patterns": [ |
| 5 | + { |
| 6 | + "include": "#keywords" |
| 7 | + }, |
| 8 | + { |
| 9 | + "include": "#punctuation" |
| 10 | + }, |
| 11 | + { |
| 12 | + "include": "#operators" |
| 13 | + }, |
| 14 | + { |
| 15 | + "include": "#identifiers" |
| 16 | + }, |
| 17 | + { |
| 18 | + "include": "#booleans" |
| 19 | + }, |
| 20 | + { |
| 21 | + "include": "#numbers" |
| 22 | + }, |
| 23 | + { |
| 24 | + "include": "#strings" |
| 25 | + }, |
| 26 | + { |
| 27 | + "include": "#comments" |
| 28 | + } |
| 29 | + ], |
| 30 | + "repository": { |
| 31 | + "keywords": { |
| 32 | + "patterns": [{ |
| 33 | + "name": "keyword", |
| 34 | + "match": "\\b(import|from|export|return|if|then|else|case|when|module|in)\\b" |
| 35 | + }] |
| 36 | + }, |
| 37 | + "punctuation": { |
| 38 | + "name": "comment", |
| 39 | + "patterns": [ |
| 40 | + { |
| 41 | + "name": "punctuation", |
| 42 | + "match": "\\.|\\||\\,|\\[|\\]|\\(|\\)|\\{|\\}" |
| 43 | + } |
| 44 | + ] |
| 45 | + }, |
| 46 | + "operators": { |
| 47 | + "patterns": [{ |
| 48 | + "name": "keyword.operator", |
| 49 | + "match": "\\-\\>|\\:\\=|\\=\\>|\\?|\\=" |
| 50 | + }] |
| 51 | + }, |
| 52 | + "identifiers": { |
| 53 | + "patterns": [ |
| 54 | + { |
| 55 | + "include": "#identifier_operators" |
| 56 | + }, |
| 57 | + { |
| 58 | + "include": "#infix_operators" |
| 59 | + }, |
| 60 | + { |
| 61 | + "include": "#regular_identifiers" |
| 62 | + } |
| 63 | + ], |
| 64 | + "repository": { |
| 65 | + "identifier_operators": { |
| 66 | + "patterns": [{ |
| 67 | + "name": "support.variable", |
| 68 | + "match": "(==|[!@$%^&*|<>~*\\\\\\-+\\/.]+)=*>?" |
| 69 | + }] |
| 70 | + }, |
| 71 | + "infix_operators": { |
| 72 | + "name": "support.variable", |
| 73 | + "begin": "`", |
| 74 | + "end": "`" |
| 75 | + }, |
| 76 | + "regular_identifiers": { |
| 77 | + "patterns": [{ |
| 78 | + "name": "variable", |
| 79 | + "match": "[a-z_][a-z0-9_]*\\??" |
| 80 | + }] |
| 81 | + } |
| 82 | + } |
| 83 | + }, |
| 84 | + "booleans": { |
| 85 | + "patterns": [{ |
| 86 | + "name": "constant.language", |
| 87 | + "match": "\\b(true|false)\\b" |
| 88 | + }] |
| 89 | + }, |
| 90 | + "numbers": { |
| 91 | + "patterns": [ |
| 92 | + { |
| 93 | + "include": "#integers" |
| 94 | + }, |
| 95 | + { |
| 96 | + "include": "#decimals" |
| 97 | + } |
| 98 | + ], |
| 99 | + "repository": { |
| 100 | + "integers": { |
| 101 | + "patterns": [{ |
| 102 | + "name": "constant.numeric", |
| 103 | + "match": "(0x(_?[A-Fa-f0-9]+)+)|(0o(_?[0-7]+)+)|(0b(_?[0-1]+)+)|(_?[0-9]+)+" |
| 104 | + }] |
| 105 | + }, |
| 106 | + "decimals": { |
| 107 | + "patterns": [{ |
| 108 | + "name": "constant.numeric", |
| 109 | + "match": "(_?[0-9]+\\._?[0-9]+(e-?_?[0-9]+)?)|(_?[0-9]+e-?_?[0-9]+)" |
| 110 | + }] |
| 111 | + } |
| 112 | + } |
| 113 | + }, |
| 114 | + "strings": { |
| 115 | + "name": "string", |
| 116 | + "begin": "\"|'", |
| 117 | + "end": "\"|'", |
| 118 | + "patterns": [ |
| 119 | + { |
| 120 | + "name": "constant.character.escape", |
| 121 | + "match": "\\\\." |
| 122 | + } |
| 123 | + ] |
| 124 | + }, |
| 125 | + "comments": { |
| 126 | + "name": "comment", |
| 127 | + "begin": "#", |
| 128 | + "end": "\n" |
| 129 | + } |
| 130 | + }, |
| 131 | + "scopeName": "source.tony" |
| 132 | +} |
0 commit comments