In the topic Generating and Running JavaScript (
https://developers.google.com/blockly/guides/app-integration/running-javascript) in the subtopic Add an API, there is a documentation link called
JS-Interpreter documentation which is your page. In it, I copied acorn.js and interpreter.js from GitHub and pasted them into my VS code. I added the codes from the topic into my code and run it. When pressed F12 (debugger) this issue came. I thought the same thing that I have a malformed input, up until yesterday I spoke with someone who knows JS who told me that my code is ok but the issue is with acorn.js and it is better to ask on the group. Today I thought to delete acorn.js and install it again, but this time I installed it from the blockly website and it worked. That is what I did.