Skip to content

Commit

Permalink
Update ANTLR4 and rollup (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Apr 8, 2024
1 parent 9b461af commit 215c47d
Show file tree
Hide file tree
Showing 8 changed files with 567 additions and 232 deletions.
503 changes: 420 additions & 83 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
"node": ">=16.0.0"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-run": "^3.0.1",
"@rollup/plugin-typescript": "^11.0.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-run": "^3.0.2",
"@rollup/plugin-typescript": "^11.1.6",
"@types/antlr4": "^4.7.3",
"@types/jest": "^29.1.1",
"@types/node": "^18.14.1",
"@typescript-eslint/eslint-plugin": "^5.39.0",
"@typescript-eslint/parser": "^5.39.0",
"antlr4": "^4.11.0",
"antlr4": "^4.13.1-patch-1",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.1",
Expand All @@ -61,7 +61,7 @@
"nodejs-file-downloader": "^4.10.2",
"prettier": "^2.7.1",
"rimraf": "^4.1.2",
"rollup": "^3.17.3",
"rollup": "^4.14.1",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
Expand Down
6 changes: 5 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ const config = {
"fs.readFileSync(__dirname + '/global.navi', 'utf-8')": JSON.stringify(globalNavi),
},
delimiters: ['', ''],
preventAssignment: true,
}),
nodeResolve({ extensions: ['.mjs', '.js', '.json', '.ts'] }),
nodeResolve({ extensions: ['.mjs', '.js', '.json', '.ts'], browser: true }),
typescript(),
run({
execArgv: ['-r', 'source-map-support/register'],
}),
],
treeshake: {
preset: 'smallest',
},
};

// eslint-disable-next-line import/no-default-export
Expand Down
2 changes: 1 addition & 1 deletion scripts/antlr4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import util from 'util';

const exec = util.promisify(_exec);

const version = '4.10.1';
const version = '4.13.1';
const jar = path.join(__dirname, '.antlr', `antlr-${version}-complete.jar`);

const fileExists = (file: string): Promise<boolean> =>
Expand Down
8 changes: 2 additions & 6 deletions src/antlr4/NaviLexer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from src/antlr4/Navi.g4 by ANTLR 4.10.1
// Generated from src/antlr4/Navi.g4 by ANTLR 4.13.1
// jshint ignore: start
import antlr4 from 'antlr4';

Expand Down Expand Up @@ -172,11 +172,7 @@ export default class NaviLexer extends antlr4.Lexer {

constructor(input) {
super(input)
this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
}

get atn() {
return atn;
this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.atn.PredictionContextCache());
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/antlr4/NaviListener.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated from src/antlr4/Navi.g4 by ANTLR 4.10.1
// Generated from src/antlr4/Navi.g4 by ANTLR 4.13.1
// jshint ignore: start
import antlr4 from 'antlr4';

Expand Down
Loading

0 comments on commit 215c47d

Please sign in to comment.