Fix bug with slow regex matcher
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Fabian Stamm 2020-10-28 02:00:35 +01:00
parent a6e6a01cd0
commit 9674807093
2 changed files with 20 additions and 1 deletions

20
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\lib\\index.js",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
}

View File

@ -54,7 +54,6 @@ function regexMatcher(regex: string | RegExp, type: TokenTypes): Matcher {
const matcher = [
regexMatcher(/^\s+/, "space"),
regexMatcher(/^(\/\*)(.|\s)*?(\*\/)/g, "comment"),
regexMatcher(/^\/\/.+/, "comment"),
regexMatcher(/^#.+/, "comment"),
regexMatcher(/^".*?"/, "string"),