Skip to content

Commit

Permalink
fix: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Apr 5, 2024
1 parent cf133c8 commit 0733e7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion parser/bnf.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@ compiler.ParseScript = function (script) {
})
const aQuotedStrings = quotedStrings.replaceAll(/`([^`\\]|\\.)+`/g, (str) => {
aqLiterals.push(str)
return `\`AL_${qLiterals.length - 1}\``
return `\`AL_${aqLiterals.length - 1}\``
})
const parsedScript = this._ParseScript(aQuotedStrings)
if (!parsedScript) {
return parsedScript
}
for (const t of parsedScript.rootToken.Children('QLITERAL')) {
t._value = qLiterals[parseInt(t.value.slice(4, t.value.length - 1))]
t.tokens = []
Expand Down

0 comments on commit 0733e7c

Please sign in to comment.