diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-10-25 00:47:47 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-10-25 00:47:47 +0200 |
| commit | c6cc0108ca7738023b45e0eeac0fa2390532dd93 (patch) | |
| tree | 36890e6cd3091bbab8efbe686cc56f467f645bfd /vendor/github.com/alecthomas/chroma/v2/lexers/embedded/monkeyc.xml | |
| parent | 0130404a1dc663d4aa68d780c9bcb23a4243e68d (diff) | |
| download | jbmafp-master.tar.gz | |
Diffstat (limited to 'vendor/github.com/alecthomas/chroma/v2/lexers/embedded/monkeyc.xml')
| -rw-r--r-- | vendor/github.com/alecthomas/chroma/v2/lexers/embedded/monkeyc.xml | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/monkeyc.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/monkeyc.xml new file mode 100644 index 0000000..7445a63 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/monkeyc.xml | |||
| @@ -0,0 +1,153 @@ | |||
| 1 | <lexer> | ||
| 2 | <config> | ||
| 3 | <name>MonkeyC</name> | ||
| 4 | <alias>monkeyc</alias> | ||
| 5 | <filename>*.mc</filename> | ||
| 6 | <mime_type>text/x-monkeyc</mime_type> | ||
| 7 | </config> | ||
| 8 | <rules> | ||
| 9 | <state name="class"> | ||
| 10 | <rule pattern="([a-zA-Z_][\w_\.]*)(?:(\s+)(extends)(\s+)([a-zA-Z_][\w_\.]*))?"> | ||
| 11 | <bygroups> | ||
| 12 | <token type="NameClass"/> | ||
| 13 | <token type="Text"/> | ||
| 14 | <token type="KeywordDeclaration"/> | ||
| 15 | <token type="Text"/> | ||
| 16 | <token type="NameClass"/> | ||
| 17 | </bygroups> | ||
| 18 | </rule> | ||
| 19 | <rule> | ||
| 20 | <pop depth="1"/> | ||
| 21 | </rule> | ||
| 22 | </state> | ||
| 23 | <state name="function"> | ||
| 24 | <rule pattern="initialize"> | ||
| 25 | <token type="NameFunctionMagic"/> | ||
| 26 | </rule> | ||
| 27 | <rule pattern="[a-zA-Z_][\w_\.]*"> | ||
| 28 | <token type="NameFunction"/> | ||
| 29 | </rule> | ||
| 30 | <rule> | ||
| 31 | <pop depth="1"/> | ||
| 32 | </rule> | ||
| 33 | </state> | ||
| 34 | <state name="module"> | ||
| 35 | <rule pattern="[a-zA-Z_][\w_\.]*"> | ||
| 36 | <token type="NameNamespace"/> | ||
| 37 | </rule> | ||
| 38 | <rule> | ||
| 39 | <pop depth="1"/> | ||
| 40 | </rule> | ||
| 41 | </state> | ||
| 42 | <state name="root"> | ||
| 43 | <rule pattern="[^\S\n]+"> | ||
| 44 | <token type="Text"/> | ||
| 45 | </rule> | ||
| 46 | <rule pattern="\n"> | ||
| 47 | <token type="Text"/> | ||
| 48 | </rule> | ||
| 49 | <rule pattern="//(\n|[\w\W]*?[^\\]\n)"> | ||
| 50 | <token type="CommentSingle"/> | ||
| 51 | </rule> | ||
| 52 | <rule pattern="/(\\\n)?[*][\w\W]*?[*](\\\n)?/"> | ||
| 53 | <token type="CommentMultiline"/> | ||
| 54 | </rule> | ||
| 55 | <rule pattern="/(\\\n)?[*][\w\W]*"> | ||
| 56 | <token type="CommentMultiline"/> | ||
| 57 | </rule> | ||
| 58 | <rule pattern=":[a-zA-Z_][\w_\.]*"> | ||
| 59 | <token type="LiteralStringSymbol"/> | ||
| 60 | </rule> | ||
| 61 | <rule pattern="[{}\[\]\(\),;:\.]"> | ||
| 62 | <token type="Punctuation"/> | ||
| 63 | </rule> | ||
| 64 | <rule pattern="[&~\|\^!+\-*\/%=?]"> | ||
| 65 | <token type="Operator"/> | ||
| 66 | </rule> | ||
| 67 | <rule pattern="=>|[+-]=|&&|\|\||>>|<<|[<>]=?|[!=]="> | ||
| 68 | <token type="Operator"/> | ||
| 69 | </rule> | ||
| 70 | <rule pattern="\b(and|or|instanceof|has|extends|new)"> | ||
| 71 | <token type="OperatorWord"/> | ||
| 72 | </rule> | ||
| 73 | <rule pattern="(false|null|true|NaN)\b"> | ||
| 74 | <token type="KeywordConstant"/> | ||
| 75 | </rule> | ||
| 76 | <rule pattern="(using)((?:\s|\\\\s)+)"> | ||
| 77 | <bygroups> | ||
| 78 | <token type="KeywordNamespace"/> | ||
| 79 | <token type="Text"/> | ||
| 80 | </bygroups> | ||
| 81 | <push state="import"/> | ||
| 82 | </rule> | ||
| 83 | <rule pattern="(class)((?:\s|\\\\s)+)"> | ||
| 84 | <bygroups> | ||
| 85 | <token type="KeywordDeclaration"/> | ||
| 86 | <token type="Text"/> | ||
| 87 | </bygroups> | ||
| 88 | <push state="class"/> | ||
| 89 | </rule> | ||
| 90 | <rule pattern="(function)((?:\s|\\\\s)+)"> | ||
| 91 | <bygroups> | ||
| 92 | <token type="KeywordDeclaration"/> | ||
| 93 | <token type="Text"/> | ||
| 94 | </bygroups> | ||
| 95 | <push state="function"/> | ||
| 96 | </rule> | ||
| 97 | <rule pattern="(module)((?:\s|\\\\s)+)"> | ||
| 98 | <bygroups> | ||
| 99 | <token type="KeywordDeclaration"/> | ||
| 100 | <token type="Text"/> | ||
| 101 | </bygroups> | ||
| 102 | <push state="module"/> | ||
| 103 | </rule> | ||
| 104 | <rule pattern="\b(if|else|for|switch|case|while|break|continue|default|do|try|catch|finally|return|throw|extends|function)\b"> | ||
| 105 | <token type="Keyword"/> | ||
| 106 | </rule> | ||
| 107 | <rule pattern="\b(const|enum|hidden|public|protected|private|static)\b"> | ||
| 108 | <token type="KeywordType"/> | ||
| 109 | </rule> | ||
| 110 | <rule pattern="\bvar\b"> | ||
| 111 | <token type="KeywordDeclaration"/> | ||
| 112 | </rule> | ||
| 113 | <rule pattern="\b(Activity(Monitor|Recording)?|Ant(Plus)?|Application|Attention|Background|Communications|Cryptography|FitContributor|Graphics|Gregorian|Lang|Math|Media|Persisted(Content|Locations)|Position|Properties|Sensor(History|Logging)?|Storage|StringUtil|System|Test|Time(r)?|Toybox|UserProfile|WatchUi|Rez|Drawables|Strings|Fonts|method)\b"> | ||
| 114 | <token type="NameBuiltin"/> | ||
| 115 | </rule> | ||
| 116 | <rule pattern="\b(me|self|\$)\b"> | ||
| 117 | <token type="NameBuiltinPseudo"/> | ||
| 118 | </rule> | ||
| 119 | <rule pattern=""(\\\\|\\"|[^"])*""> | ||
| 120 | <token type="LiteralStringDouble"/> | ||
| 121 | </rule> | ||
| 122 | <rule pattern="'(\\\\|\\'|[^''])*'"> | ||
| 123 | <token type="LiteralStringSingle"/> | ||
| 124 | </rule> | ||
| 125 | <rule pattern="-?(0x[0-9a-fA-F]+l?)"> | ||
| 126 | <token type="LiteralNumberHex"/> | ||
| 127 | </rule> | ||
| 128 | <rule pattern="-?([0-9]+(\.[0-9]+[df]?|[df]))\b"> | ||
| 129 | <token type="LiteralNumberFloat"/> | ||
| 130 | </rule> | ||
| 131 | <rule pattern="-?([0-9]+l?)"> | ||
| 132 | <token type="LiteralNumberInteger"/> | ||
| 133 | </rule> | ||
| 134 | <rule pattern="[a-zA-Z_]\w*"> | ||
| 135 | <token type="Name"/> | ||
| 136 | </rule> | ||
| 137 | </state> | ||
| 138 | <state name="import"> | ||
| 139 | <rule pattern="([a-zA-Z_][\w_\.]*)(?:(\s+)(as)(\s+)([a-zA-Z_][\w_]*))?"> | ||
| 140 | <bygroups> | ||
| 141 | <token type="NameNamespace"/> | ||
| 142 | <token type="Text"/> | ||
| 143 | <token type="KeywordNamespace"/> | ||
| 144 | <token type="Text"/> | ||
| 145 | <token type="NameNamespace"/> | ||
| 146 | </bygroups> | ||
| 147 | </rule> | ||
| 148 | <rule> | ||
| 149 | <pop depth="1"/> | ||
| 150 | </rule> | ||
| 151 | </state> | ||
| 152 | </rules> | ||
| 153 | </lexer> \ No newline at end of file | ||
