mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 22:02:55 +01:00
Merge pull request #37 from avelino/clojure
Clojure: added more keywords
This commit is contained in:
commit
b6f47a51d6
2 changed files with 74 additions and 18 deletions
|
|
@ -27,6 +27,14 @@ testTokenization('clojure', [
|
||||||
{ startIndex: 8, type: 'string.clj'},
|
{ startIndex: 8, type: 'string.clj'},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
line: 'in-ns "user',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'keyword.clj' },
|
||||||
|
{ startIndex: 5, type: 'white.clj' },
|
||||||
|
{ startIndex: 6, type: 'string.clj' },
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
// comments
|
// comments
|
||||||
|
|
|
||||||
|
|
@ -44,32 +44,77 @@ export const language = <ILanguage>{
|
||||||
|
|
||||||
keywords: [
|
keywords: [
|
||||||
'ns',
|
'ns',
|
||||||
'ns-unmap',
|
'ns\-unmap',
|
||||||
|
'create\-ns',
|
||||||
|
'in\-ns',
|
||||||
'fn',
|
'fn',
|
||||||
'def',
|
'def',
|
||||||
'defn',
|
'defn',
|
||||||
'defmacro',
|
'defmacro',
|
||||||
'defmulti',
|
'defmulti',
|
||||||
'defonce',
|
'defonce',
|
||||||
'bound\\-fn',
|
'require',
|
||||||
|
'import',
|
||||||
|
'new',
|
||||||
|
'refer',
|
||||||
|
'pos',
|
||||||
|
'pos\?',
|
||||||
|
'filter',
|
||||||
|
'map',
|
||||||
|
'reduce',
|
||||||
|
'repeat',
|
||||||
|
'key',
|
||||||
|
'rest',
|
||||||
|
'concat',
|
||||||
|
'into',
|
||||||
|
'reverse',
|
||||||
|
'iterate',
|
||||||
|
'range',
|
||||||
|
'drop',
|
||||||
|
'drop\-while',
|
||||||
|
'take',
|
||||||
|
'take\-while',
|
||||||
|
'neg',
|
||||||
|
'neg?',
|
||||||
|
'bound\-fn',
|
||||||
'if',
|
'if',
|
||||||
'if\\-not',
|
'if\-not',
|
||||||
|
'if\-let',
|
||||||
'case,',
|
'case,',
|
||||||
|
'contains',
|
||||||
|
'conj',
|
||||||
|
'disj',
|
||||||
|
'sort',
|
||||||
|
'get',
|
||||||
|
'assoc',
|
||||||
|
'merge',
|
||||||
|
'keys',
|
||||||
|
'vals',
|
||||||
|
'nth',
|
||||||
|
'first',
|
||||||
|
'last',
|
||||||
|
'count',
|
||||||
|
'contains?',
|
||||||
'cond',
|
'cond',
|
||||||
'condp',
|
'condp',
|
||||||
'cond\\-\\>',
|
'cond\-\>',
|
||||||
'cond\\-\\>\\>',
|
'cond\-\>\>',
|
||||||
'when',
|
'when',
|
||||||
'while',
|
'while',
|
||||||
'when\\-not',
|
'when\-not',
|
||||||
'when\\-first',
|
'when\-let',
|
||||||
|
'when\-first',
|
||||||
'do',
|
'do',
|
||||||
'future',
|
'future',
|
||||||
'comment',
|
'comment',
|
||||||
'doto',
|
'doto',
|
||||||
'locking',
|
'locking',
|
||||||
'proxy',
|
'proxy',
|
||||||
'as\\-\\>',
|
'println',
|
||||||
|
'type',
|
||||||
|
'meta',
|
||||||
|
'var',
|
||||||
|
'as\-\>',
|
||||||
'reify',
|
'reify',
|
||||||
'deftype',
|
'deftype',
|
||||||
'defrecord',
|
'defrecord',
|
||||||
|
|
@ -78,7 +123,7 @@ export const language = <ILanguage>{
|
||||||
'extend-protocol',
|
'extend-protocol',
|
||||||
'extend-type',
|
'extend-type',
|
||||||
'specify',
|
'specify',
|
||||||
'specify\\!',
|
'specify\!',
|
||||||
'try',
|
'try',
|
||||||
'catch',
|
'catch',
|
||||||
'finally',
|
'finally',
|
||||||
|
|
@ -87,29 +132,32 @@ export const language = <ILanguage>{
|
||||||
'binding',
|
'binding',
|
||||||
'loop',
|
'loop',
|
||||||
'for',
|
'for',
|
||||||
|
'seq',
|
||||||
'doseq',
|
'doseq',
|
||||||
'dotimes',
|
'dotimes',
|
||||||
'when\\-let',
|
'when\-let',
|
||||||
'if\\-let',
|
'if\-let',
|
||||||
'when\\-some',
|
'when\-some',
|
||||||
'if\\-some',
|
'if\-some',
|
||||||
'this\\-as',
|
'this\-as',
|
||||||
'defmethod',
|
'defmethod',
|
||||||
'testing',
|
'testing',
|
||||||
'deftest',
|
'deftest',
|
||||||
'are',
|
'are',
|
||||||
'use\\-fixtures',
|
'use\-fixtures',
|
||||||
|
'use',
|
||||||
|
'remove',
|
||||||
'run',
|
'run',
|
||||||
'run\\*',
|
'run\*',
|
||||||
'fresh',
|
'fresh',
|
||||||
'alt!',
|
'alt!',
|
||||||
'alt!!',
|
'alt!!',
|
||||||
'go',
|
'go',
|
||||||
'go\\-loop',
|
'go\-loop',
|
||||||
'thread',
|
'thread',
|
||||||
],
|
],
|
||||||
|
|
||||||
constants: ['true', 'false', 'nil'],
|
constants: ['true', 'false', 'nil', 'boolean', 'str'],
|
||||||
|
|
||||||
operators: ['=', 'not=', '<', '<=', '>', '>=', 'and', 'or', 'not', 'inc', 'dec', 'max', 'min', 'rem', 'bit-and', 'bit-or', 'bit-xor', 'bit-not'],
|
operators: ['=', 'not=', '<', '<=', '>', '>=', 'and', 'or', 'not', 'inc', 'dec', 'max', 'min', 'rem', 'bit-and', 'bit-or', 'bit-xor', 'bit-not'],
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue