Explorar el Código

Merge pull request #137 from akonatala/update-cameligo-language-support

Update cameligo language support
Alexandru Dima hace 4 años
padre
commit
319a1ddf56
Se han modificado 1 ficheros con 18 adiciones y 7 borrados
  1. 18 7
      src/cameligo/cameligo.ts

+ 18 - 7
src/cameligo/cameligo.ts

@@ -21,14 +21,18 @@ export const conf: languages.LanguageConfiguration = {
 		{ open: '[', close: ']' },
 		{ open: '(', close: ')' },
 		{ open: '<', close: '>' },
-		{ open: "'", close: "'" }
+		{ open: "'", close: "'" },
+		{ open: "\"", close: "\""},
+		{ open: "(*", close: "*)"},
 	],
 	surroundingPairs: [
 		{ open: '{', close: '}' },
 		{ open: '[', close: ']' },
 		{ open: '(', close: ')' },
 		{ open: '<', close: '>' },
-		{ open: "'", close: "'" }
+		{ open: "'", close: "'" },
+		{ open: "\"", close: "\""},
+		{ open: "(*", close: "*)"},
 	]
 };
 
@@ -46,14 +50,16 @@ export const language = <languages.IMonarchLanguage>{
 
 	keywords: [
 		'abs',
-		'begin',
+		'assert',
+		'block',
 		'Bytes',
+		'case',
 		'Crypto',
 		'Current',
 		'else',
-		'end',
 		'failwith',
 		'false',
+		'for',
 		'fun',
 		'if',
 		'in',
@@ -71,18 +77,21 @@ export const language = <languages.IMonarchLanguage>{
 		'operation',
 		'Operation',
 		'of',
+		'record',
 		'Set',
 		'set',
 		'sender',
+		'skip',
 		'source',
 		'String',
 		'then',
+		'to',
 		'true',
 		'type',
-		'with'
+		'with',
 	],
 
-	typeKeywords: ['int', 'unit', 'string', 'tz'],
+	typeKeywords: ['int', 'unit', 'string', 'tz', 'nat', 'bool'],
 
 	operators: [
 		'=',
@@ -105,7 +114,9 @@ export const language = <languages.IMonarchLanguage>{
 		'^',
 		'%',
 		'->',
-		'<-'
+		'<-',
+		'&&',
+		'||',
 	],
 
 	// we include these common regular expressions