Closed jerrettl closed 1 year ago
A new language needs to be defined within the Monaco editor's API.
Default MIPS definition: https://github.com/microsoft/monaco-editor/blob/main/src/basic-languages/mips/mips.ts
How you might import it in Rust: https://github.com/abesto/clox-rs/blob/main/web/src/monaco_lox.rs https://github.com/abesto/clox-rs/blob/main/web/js/loxMonarchTokensProvider.js (This is essentially copied from mips.ts.)
mips.ts
Written in Rust is just the language configuration, with the tokens and tokenizer provided in Javascript.
A new language needs to be defined within the Monaco editor's API.
Default MIPS definition: https://github.com/microsoft/monaco-editor/blob/main/src/basic-languages/mips/mips.ts
How you might import it in Rust: https://github.com/abesto/clox-rs/blob/main/web/src/monaco_lox.rs https://github.com/abesto/clox-rs/blob/main/web/js/loxMonarchTokensProvider.js (This is essentially copied from
mips.ts
.)Written in Rust is just the language configuration, with the tokens and tokenizer provided in Javascript.