js_variable_to_python: add tests, handle more JS syntax

The tests from chompjs are copied.
The comment out tests do not pass.
The implementation of js_variable_to_python has been updated:
* in the main looop, try to make the four different cases more clear
* handle decimal number like "-.5", "5." or "- 5"  (without double quote)
* the character ` is seen a string delimiter as intended in JS
* the identifiers follow JS specification ($, _, letters and numbers)
This commit is contained in:
Alexandre Flament 2023-09-16 13:45:15 +00:00
parent ec540a967a
commit 72f5e7cfb8
3 changed files with 392 additions and 46 deletions

View file

@ -21,3 +21,4 @@ aiounittest==1.4.2
yamllint==1.32.0
wlc==1.13
coloredlogs==15.0.1
parameterized==0.9.0