Skip to content

Commit

Permalink
fix playground sample
Browse files Browse the repository at this point in the history
  • Loading branch information
sezna committed Jul 21, 2024
1 parent a51cc90 commit 95beb4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions petr-playground/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ monaco.languages.register({ id: "petr" });

// Register a tokens provider for the language
monaco.languages.setMonarchTokensProvider("petr", {
keywords: [ 'function', 'returns', 'in' ],
keywords: [ 'fn', 'returns', 'in', 'type', 'export' ],
tokenizer: {
root: [
[/\~([a-zA-Z][a-zA-Z0-9]+)(\.[a-zA-Z]([a-zA-Z0-9])+)*/, "function-call"],
Expand Down Expand Up @@ -111,7 +111,7 @@ monaco.languages.registerCompletionItemProvider("mySpecialLanguage", {


monaco.editor.create(document.getElementById('monaco-editor'), {
value: "function main() returns 'unit \n ~std.io.print \"Hello, World!\"",
value: "fn main() returns 'unit \n ~std.io.print \"Hello, World!\"",
language: 'petr',
theme: "petr-theme",
});
Expand Down

0 comments on commit 95beb4b

Please sign in to comment.