aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2022-07-18 05:33:06 -0500
committerMatt Godbolt <matt@godbolt.org>2022-07-18 05:33:06 -0500
commit8ad4932da4ac9b0440ddb425d3379f5ed62471de (patch)
tree0b2fce4c99cab686c165c474bd911fc89a7860c1
parentc5e96d83fea82f91366e9413abcb0c18b236f550 (diff)
downloadcompiler-explorer-gh-3640.tar.gz
compiler-explorer-gh-3640.zip
Steal C++'s language config as a starting pointgh-3640
-rw-r--r--static/modes/quetzal-mode.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/static/modes/quetzal-mode.ts b/static/modes/quetzal-mode.ts
index f43d72c11..b5cd5a0cc 100644
--- a/static/modes/quetzal-mode.ts
+++ b/static/modes/quetzal-mode.ts
@@ -25,6 +25,7 @@
'use strict';
const monaco = require('monaco-editor');
+const cpp = require('monaco-editor/esm/vs/basic-languages/cpp/cpp');
function definition() {
return {
@@ -132,7 +133,7 @@ function definition() {
[/[;,.]/, 'delimiter'],
// strings
- [/"([^"\\]|\\.)*$/, 'string.invalid'], // non-teminated string
+ [/"([^"\\]|\\.)*$/, 'string.invalid'], // non-terminated string
[/"/, {token: 'string.quote', bracket: '@open', next: '@string'}],
// characters
@@ -167,5 +168,6 @@ function definition() {
const def = definition();
monaco.languages.register({id: 'quetzal'});
monaco.languages.setMonarchTokensProvider('quetzal', def);
+monaco.languages.setLanguageConfiguration('quetzal', cpp.conf);
export = def;