This commit is contained in:
masad-frost 2018-06-08 23:45:35 -07:00
parent b6f47a51d6
commit 9987c4fd86

View file

@ -44,9 +44,9 @@ export const language = <ILanguage>{
keywords: [ keywords: [
'ns', 'ns',
'ns\-unmap', 'ns-unmap',
'create\-ns', 'create-ns',
'in\-ns', 'in-ns',
'fn', 'fn',
'def', 'def',
'defn', 'defn',
@ -58,7 +58,7 @@ export const language = <ILanguage>{
'new', 'new',
'refer', 'refer',
'pos', 'pos',
'pos\?', 'pos?',
'filter', 'filter',
'map', 'map',
'reduce', 'reduce',
@ -71,15 +71,15 @@ export const language = <ILanguage>{
'iterate', 'iterate',
'range', 'range',
'drop', 'drop',
'drop\-while', 'drop-while',
'take', 'take',
'take\-while', 'take-while',
'neg', 'neg',
'neg?', 'neg?',
'bound\-fn', 'bound-fn',
'if', 'if',
'if\-not', 'if-not',
'if\-let', 'if-let',
'case,', 'case,',
'contains', 'contains',
'conj', 'conj',
@ -97,13 +97,13 @@ export const language = <ILanguage>{
'contains?', 'contains?',
'cond', 'cond',
'condp', 'condp',
'cond\-\>', 'cond->',
'cond\-\>\>', 'cond->>',
'when', 'when',
'while', 'while',
'when\-not', 'when-not',
'when\-let', 'when-let',
'when\-first', 'when-first',
'do', 'do',
'future', 'future',
'comment', 'comment',
@ -114,7 +114,7 @@ export const language = <ILanguage>{
'type', 'type',
'meta', 'meta',
'var', 'var',
'as\-\>', 'as->',
'reify', 'reify',
'deftype', 'deftype',
'defrecord', 'defrecord',
@ -123,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',
@ -135,38 +135,60 @@ export const language = <ILanguage>{
'seq', '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', 'use',
'remove', 'remove',
'run', 'run',
'run\*', 'run*',
'fresh', 'fresh',
'alt!', 'alt!',
'alt!!', 'alt!!',
'go', 'go',
'go\-loop', 'go-loop',
'thread', 'thread',
], ],
constants: ['true', 'false', 'nil', 'boolean', 'str'], 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',
],
tokenizer: { tokenizer: {
root: [ root: [
[/#[xXoObB][0-9a-fA-F]+/, 'number.hex'], [/#[xXoObB][0-9a-fA-F]+/, 'number.hex'],
[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/, 'number.float'], [/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/, 'number.float'],
[/(?:\b(?:(def|defn|defmacro|defmulti|defonce|ns|ns-unmap|fn))\b)(\s+)((?:\w|\-|\!|\?)*)/, ['keyword', 'white', 'variable']], [
/(?:\b(?:(def|defn|defmacro|defmulti|defonce|ns|ns-unmap|fn))\b)(\s+)((?:\w|\-|\!|\?)*)/,
['keyword', 'white', 'variable'],
],
[ [
/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/, /[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,