diff --git a/src/kotlin/kotlin.ts b/src/kotlin/kotlin.ts index 82e166b6..c21a2a95 100644 --- a/src/kotlin/kotlin.ts +++ b/src/kotlin/kotlin.ts @@ -10,7 +10,7 @@ import ILanguage = monaco.languages.IMonarchLanguage; export const conf: IRichLanguageConfiguration = { // the default separators except `@$` - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + //wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '//', blockComment: ['/*', '*/'], @@ -37,8 +37,8 @@ export const conf: IRichLanguageConfiguration = { ], folding: { markers: { - start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"), - end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))") + //start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"), + //end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))") } } }; @@ -48,67 +48,15 @@ export const language = <ILanguage>{ tokenPostfix: '.java', keywords: [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - + 'as', 'as?', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', + 'in', '!in', 'interface', 'is', '!is', 'null', 'object', 'package', 'return', 'super', + 'this', 'throw', 'true', 'try', 'typealias', 'val', 'var', 'when', 'while', 'by', + 'catch', 'constructor', 'delegate', 'dynamic', 'field', 'file', 'finally', 'get', + 'import', 'init', 'param', 'property', 'receiver', 'set', 'setparam', 'where', 'actual', + 'abstract','annotation', 'companion', 'const', 'crossinline', 'data', 'enum', 'expect', + 'external', 'final', 'infix', 'inline', 'inner', 'internal', 'lateinit', 'noinline', + 'open', 'operator', 'out', 'override', 'private', 'protected', 'public', 'reified', + 'sealed', 'suspend', 'tailrec', 'vararg', 'field', 'it' ], operators: [