Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokenization testing #4

Merged
merged 22 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ jobs:
java-version: 11
distribution: 'temurin'
cache: 'maven'
- uses: actions/setup-node@v4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add which version of node we need. and enable caching to improve CI times.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

with:
node-version: 20
cache: 'npm'
cache-dependency-path: 'rascal-textmate-core/package-lock.json'
- name: install-tokenizer
working-directory: rascal-textmate-core
run: npm install vscode-tmgrammar-test
- name: run-tests
working-directory: rascal-textmate-core
run: mvn test -B -Drascal.compile.skip -Drascal.tutor.skip
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,18 @@ TextMate grammars, this project applies partial conversion. Alternatively, a
previous [project](https://github.com/TarVK/syntax-highlighter) by
[@TarVK](https://github.com/TarVK) applies total conversion.

The [walkthrough](src/main/rascal/lang/textmate/conversiontests/Walkthrough.rsc)
## Documentation

The [walkthrough](rascal-textmate-core/src/main/rascal/lang/textmate/conversiontests/Walkthrough.rsc)
explains the main ideas behind the conversion algorithm in this project.

## Tests

To test tokenization (as part of the conversion
[tests](rascal-textmate-core/src/main/rascal/lang/textmate/conversiontests)),
the [`vscode-tmgrammar-test`](https://github.com/PanAeon/vscode-tmgrammar-test)
tool is used. Install it locally in directory `rascal-textmate-core` as follows:

```
npm install vscode-tmgrammar-test
```
3 changes: 2 additions & 1 deletion rascal-textmate-core/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target
target
node_modules
Loading