| 29 | import cppp from './cppp-mode.js'; |
| 30 | |
| 31 | function definition(): monaco.languages.IMonarchLanguage { |
| 32 | const cppx_blue = $.extend(true, {}, cppp); // deep copy |
| 33 | cppx_blue.tokenPostfix = '.herb'; |
| 34 | |
| 35 | // add the 'type' keyword |
| 36 | cppx_blue.keywords.push('type'); |
| 37 | |
| 38 | // pick up 'identifier:' as a definition. |
| 39 | cppx_blue.tokenizer.root.unshift([/[a-zA-Z_]\w*\s*:/, 'identifier.definition']); |
| 40 | |
| 41 | return cppx_blue; |
| 42 | } |
| 43 | |
| 44 | monaco.languages.register({id: 'cppx-blue'}); |
| 45 | monaco.languages.setLanguageConfiguration('cppx-blue', cpp.conf); |