/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import IRichLanguageConfiguration = monaco.languages.LanguageConfiguration; import ILanguage = monaco.languages.IMonarchLanguage; export var conf:IRichLanguageConfiguration = { comments: { lineComment: '--', blockComment: ['--[[', ']]'], }, brackets: [['{','}'], ['[',']'], ['(',')']], autoClosingPairs: [ { open: '"', close: '"', notIn: ['string', 'comment'] }, { open: '\'', close: '\'', notIn: ['string', 'comment'] }, { open: '{', close: '}', notIn: ['string', 'comment'] }, { open: '[', close: ']', notIn: ['string', 'comment'] }, { open: '(', close: ')', notIn: ['string', 'comment'] }, ] }; export var language = { defaultToken: '', tokenPostfix: '.lua', keywords: [ 'and', 'break', 'do', 'else', 'elseif', 'end', 'false', 'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', 'return', 'then', 'true', 'until', 'while' ], brackets: [ { token: 'delimiter.bracket', open: '{', close: '}'}, { token: 'delimiter.array', open: '[', close: ']'}, { token: 'delimiter.parenthesis', open: '(', close: ')'} ], operators: [ '+', '-', '*', '/', '%', '^', '#', '==', '~=', '<=', '>=', '<', '>', '=', ';', ':', ',', '.', '..', '...' ], // we include these common regular expressions symbols: /[=>