Ver código fonte

Add operators

Andrew Watson 6 anos atrás
pai
commit
c071453275
1 arquivos alterados com 4 adições e 7 exclusões
  1. 4 7
      src/kotlin/kotlin.ts

+ 4 - 7
src/kotlin/kotlin.ts

@@ -60,11 +60,10 @@ export const language = <ILanguage>{
 	],
 
 	operators: [
-		'=', '>', '<', '!', '~', '?', ':',
-		'==', '<=', '>=', '!=', '&&', '||', '++', '--',
-		'+', '-', '*', '/', '&', '|', '^', '%', '<<',
-		'>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=',
-		'^=', '%=', '<<=', '>>=', '>>>='
+		'+', '-', '*', '/', '%', '=', '+=', '-=', '*=', '/=',
+		'%=', '++', '--', '&&', '||', '!', '==', '!=', '===',
+		'!==', '>', '<', '<=', '>=', '[', ']', '!!', '?.', '?:',
+		'::', '..', ':', '?', '->', '@', ';', '$', '_'
 	],
 
 	// we include these common regular expressions
@@ -133,8 +132,6 @@ export const language = <ILanguage>{
 
 		comment: [
 			[/[^\/*]+/, 'comment'],
-			// [/\/\*/, 'comment', '@push' ],    // nested comment not allowed :-(
-			// [/\/\*/,    'comment.invalid' ],    // this breaks block comments in the shape of /* //*/
 			[/\*\//, 'comment', '@pop'],
 			[/[\/*]/, 'comment']
 		],