Merge pull request #37 from avelino/clojure

Clojure: added more keywords
pull/2748/head
Alexandru Dima 7 years ago committed by GitHub
commit b6f47a51d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,6 +27,14 @@ testTokenization('clojure', [
{ 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

@ -44,32 +44,77 @@ export const language = <ILanguage>{
keywords: [
'ns',
'ns-unmap',
'ns\-unmap',
'create\-ns',
'in\-ns',
'fn',
'def',
'defn',
'defmacro',
'defmulti',
'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\\-not',
'if\-not',
'if\-let',
'case,',
'contains',
'conj',
'disj',
'sort',
'get',
'assoc',
'merge',
'keys',
'vals',
'nth',
'first',
'last',
'count',
'contains?',
'cond',
'condp',
'cond\\-\\>',
'cond\\-\\>\\>',
'cond\-\>',
'cond\-\>\>',
'when',
'while',
'when\\-not',
'when\\-first',
'when\-not',
'when\-let',
'when\-first',
'do',
'future',
'comment',
'doto',
'locking',
'proxy',
'as\\-\\>',
'println',
'type',
'meta',
'var',
'as\-\>',
'reify',
'deftype',
'defrecord',
@ -78,7 +123,7 @@ export const language = <ILanguage>{
'extend-protocol',
'extend-type',
'specify',
'specify\\!',
'specify\!',
'try',
'catch',
'finally',
@ -87,29 +132,32 @@ export const language = <ILanguage>{
'binding',
'loop',
'for',
'seq',
'doseq',
'dotimes',
'when\\-let',
'if\\-let',
'when\\-some',
'if\\-some',
'this\\-as',
'when\-let',
'if\-let',
'when\-some',
'if\-some',
'this\-as',
'defmethod',
'testing',
'deftest',
'are',
'use\\-fixtures',
'use\-fixtures',
'use',
'remove',
'run',
'run\\*',
'run\*',
'fresh',
'alt!',
'alt!!',
'go',
'go\\-loop',
'go\-loop',
'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'],

Loading…
Cancel
Save