Closed aabounegm closed 1 year ago
Unfortunately, I cannot test this locally. When I run the extension, I get the following error:
Activating extension 'NikolaiKudasovfizruk.rzk-1-experimental-highlighting' failed:
Cannot find module '/Users/nikolaikudasov/git/fizruk/vscode-rzk/out/extension.js'
Require stack:
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js
- .
EDIT: the problem is resolved with
npm i
npm run compile
I've tested this, looks good to me (see https://github.com/fizruk/vscode-rzk/pull/14#issuecomment-1598326004).
Pending support for the
tokenize
subcommand inrzk
.As an example, the following snippet:
could generate this list of tokens:
```js [ // #lang rzk-1 { line: 0, startCharacter: 0, length: 5, tokenType: 'macro', tokenModifiers: [], }, { line: 0, startCharacter: 6, length: 5, tokenType: 'enumMember', tokenModifiers: [], }, // Comment { line: 2, startCharacter: 0, length: 12, tokenType: 'comment', tokenModifiers: [], }, // #def Δ² : (2 * 2) -> TOPE { line: 3, startCharacter: 0, length: 4, tokenType: 'keyword', tokenModifiers: [], }, { line: 3, startCharacter: 5, length: 2, tokenType: 'function', tokenModifiers: ['declaration'], }, { line: 3, startCharacter: 11, length: 1, tokenType: 'number', tokenModifiers: [], }, { line: 3, startCharacter: 13, length: 1, tokenType: 'operator', tokenModifiers: [], }, { line: 3, startCharacter: 15, length: 1, tokenType: 'number', tokenModifiers: [], }, { line: 3, startCharacter: 18, length: 2, tokenType: 'operator', tokenModifiers: [], }, { line: 3, startCharacter: 21, length: 4, tokenType: 'type', tokenModifiers: ['defaultLibrary'], }, // := \(t, s) -> s <= t { line: 4, startCharacter: 2, length: 2, tokenType: 'operator', tokenModifiers: ['definition'], }, { line: 4, startCharacter: 7, length: 1, tokenType: 'parameter', tokenModifiers: ['declaration'], }, { line: 4, startCharacter: 10, length: 1, tokenType: 'parameter', tokenModifiers: ['declaration'], }, { line: 4, startCharacter: 13, length: 2, tokenType: 'operator', tokenModifiers: [], }, { line: 4, startCharacter: 16, length: 1, tokenType: 'parameter', tokenModifiers: [], }, { line: 4, startCharacter: 18, length: 2, tokenType: 'operator', tokenModifiers: [], }, { line: 4, startCharacter: 21, length: 1, tokenType: 'parameter', tokenModifiers: [], }, ]; ```