brython-dev / brython

Brython (Browser Python) is an implementation of Python 3 running in the browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Errors in the new parser

kotnen opened this issue · comments

I have found two bugs in the new parser:

  1. JavaScriptError: ReferenceError: SurrogatePair is not defined is raised when using "\U" unicode string escapes for values bigger than "\U0000FFFF".
  2. JavascriptError: ReferenceError: $token is not defined is raised when using escapes (such as "\u", "\x", etc.), if not all of the arguments aren't provided. For example, "\u", "\Uabc", etc.

Thanks for the report @kotnen !

The first bug exists in the latest release but was fixed since. The commit referenced above fixes the second one.