Skip to content

Commit

Permalink
Some bigger changes.
Browse files Browse the repository at this point in the history
- Fixed all circular dependencies to allow executing the tool actually.
- Started replacing the old antlr3 Tree/BaseTree/CommonTree with the antlr4 ParseTree.
- This breaks the (few) unit tests, but I don't want the patch to grow too large.

Also switched to vitest for unit testing.
  • Loading branch information
mike-lischke committed Oct 27, 2024
1 parent 2acebb3 commit af218f6
Show file tree
Hide file tree
Showing 119 changed files with 17,564 additions and 8,494 deletions.
22 changes: 11 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@
{
"type": "node",
"request": "launch",
"name": "Run selected Jest test",
"runtimeExecutable": "npm",
"runtimeArgs": [
"t",
],
"name": "Debug Current Test File",
"program": "${workspaceFolder}/node_modules/vitest/vitest.mjs",
"args": [
"--",
"-i",
"${file}",
"-t",
"--no-coverage"
"run",
"${relativeFile}"
],
"autoAttachChildProcesses": true,
"skipFiles": [
"<node_internals>/**",
"**/node_modules/**"
],
"console": "integratedTerminal",
},
"smartStep": true
}
]
}
2 changes: 1 addition & 1 deletion build/generate-tool-parsers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ printf "\x1b[1m\x1b[34mGenerating tool parsers...\x1b[0m\n\n"
antlr4ng -Dlanguage=TypeScript -no-visitor -no-listener -Xexact-output-dir -o ./src/generated ./src/grammars/ActionSplitter.g4
antlr4ng -Dlanguage=TypeScript -no-visitor -no-listener -Xexact-output-dir -o ./src/generated ./src/grammars/LexBasic.g4
antlr4ng -Dlanguage=TypeScript -no-visitor -no-listener -Xexact-output-dir -o ./src/generated ./src/grammars/ANTLRv4Lexer.g4
antlr4ng -Dlanguage=TypeScript -no-visitor -no-listener -Xexact-output-dir -o ./src/generated ./src/grammars/ANTLRv4Parser.g4
antlr4ng -Dlanguage=TypeScript -visitor -no-listener -Xexact-output-dir -o ./src/generated ./src/grammars/ANTLRv4Parser.g4

printf "done\n\n"
22 changes: 18 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export default tslint.config(
...tslint.configs.strictTypeChecked,
...tslint.configs.stylisticTypeChecked,
jsdoc.configs["flat/recommended"],
{
// This must be in its own object to avoid a bug in the ESLint parser.
ignores: ["src/generated/*"],
},
{
plugins: {
"@stylistic": stylistic,
Expand Down Expand Up @@ -51,6 +55,8 @@ export default tslint.config(
}
],
"brace-style": ["error", "1tbs", { "allowSingleLine": false }],
"curly": ["error", "all"],
"arrow-body-style": ["error", "always"],
"@stylistic/padding-line-between-statements": [
"error",
{
Expand Down Expand Up @@ -229,20 +235,28 @@ export default tslint.config(
"@typescript-eslint/prefer-return-this-type": "off",
"@typescript-eslint/no-invalid-void-type": "off",
"@typescript-eslint/unified-signatures": "off",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/no-deprecated": "off",
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns-type": "off",
"jsdoc/tag-lines": [
// Have to switch this off, as it is not good enough to be used.
"off"
],
"jsdoc/no-undefined-types": [
"off", // Requires a comment syntax incompatible with VS Code.
{
"markVariablesAsUsed": false
}
],
"jsdoc/tag-lines": [
"error",
"any",
{
"startLines": 1
}
],
"prefer-arrow/prefer-arrow-functions": [
"warn",
{
Expand Down
121 changes: 0 additions & 121 deletions jest.config.ts

This file was deleted.

Loading

0 comments on commit af218f6

Please sign in to comment.