diff options
author | Matt Godbolt <matt@godbolt.org> | 2022-07-18 05:33:06 -0500 |
---|---|---|
committer | Matt Godbolt <matt@godbolt.org> | 2022-07-18 05:33:06 -0500 |
commit | 8ad4932da4ac9b0440ddb425d3379f5ed62471de (patch) | |
tree | 0b2fce4c99cab686c165c474bd911fc89a7860c1 | |
parent | c5e96d83fea82f91366e9413abcb0c18b236f550 (diff) | |
download | compiler-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.ts | 4 |
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; |