From e79971fa30a472345eecd273b1e3e002dfc14782 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Sat, 8 Jul 2023 00:46:17 +0200 Subject: [PATCH] update luaparse --- package.json | 4 ++-- src/parser.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 43303ca..7dd5c7a 100644 --- a/package.json +++ b/package.json @@ -31,11 +31,11 @@ "lint:fix": "eslint . --ignore-path .gitignore --ext .ts --fix" }, "dependencies": { - "luaparse": "^0.2.1", + "luaparse": "^0.3.1", "printj": "^1.2.2" }, "devDependencies": { - "@types/luaparse": "^0.2.6", + "@types/luaparse": "^0.2.9", "@types/node": "^12.12.11", "@typescript-eslint/eslint-plugin": "^2.8.0", "@typescript-eslint/parser": "^2.8.0", diff --git a/src/parser.ts b/src/parser.ts index c684156..8aac376 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -742,7 +742,8 @@ const parse = (data: string): string => { const ast = luaparse.parse(data.replace(/^#.*/, ''), { scope: false, comments: false, - luaVersion: '5.3' + luaVersion: '5.3', + encodingMode: 'x-user-defined' }) checkGoto(ast) setExtraInfo(ast)