فهرست منبع

added more keywords
Clojure has many reserved words

Avelino 7 سال پیش
والد
کامیت
8bfec94690
1فایلهای تغییر یافته به همراه49 افزوده شده و 1 حذف شده
  1. 49 1
      src/clojure/clojure.ts

+ 49 - 1
src/clojure/clojure.ts

@@ -45,16 +45,56 @@ 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',
+    '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',
     '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\\-\\>',
@@ -62,6 +102,7 @@ export const language = <ILanguage>{
     'when',
     'when',
     'while',
     'while',
     'when\\-not',
     'when\\-not',
+    'when\\-let',
     'when\\-first',
     'when\\-first',
     'do',
     'do',
     'future',
     'future',
@@ -69,6 +110,10 @@ export const language = <ILanguage>{
     'doto',
     'doto',
     'locking',
     'locking',
     'proxy',
     'proxy',
+    'println',
+    'type',
+    'meta',
+    'var',
     'as\\-\\>',
     'as\\-\\>',
     'reify',
     'reify',
     'deftype',
     'deftype',
@@ -87,6 +132,7 @@ export const language = <ILanguage>{
     'binding',
     'binding',
     'loop',
     'loop',
     'for',
     'for',
+    'seq',
     'doseq',
     'doseq',
     'dotimes',
     'dotimes',
     'when\\-let',
     'when\\-let',
@@ -99,6 +145,8 @@ export const language = <ILanguage>{
     'deftest',
     'deftest',
     'are',
     'are',
     'use\\-fixtures',
     'use\\-fixtures',
+    'use',
+    'remove',
     'run',
     'run',
     'run\\*',
     'run\\*',
     'fresh',
     'fresh',
@@ -109,7 +157,7 @@ export const language = <ILanguage>{
     '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'],