String formatting mini language in fstrings broken
Parser change?
I may be misreading this issue, but if it is helpful, I just transcoded the Jython minilanguage parser to JS last week. Happy to contribute it to the code if you need a parser.
My work project needed a full-featured, fully-compliant parser, and I figured since Jython has been around 20 years, it probably has had time to get it right. Plus Java is close enough to JS syntactically that it wasn't terrible.
Hi, good to hear from you! And thanks, this may be interesting, not sure yet. B.T.W. I meant the recent change to the CPython parser. CPython uses a different parsing principle now, that may have some unforeseen consequences.
I think I just ran into this one trying to format a number with commas.
This Python code :
f'{1000000:,}'
in JS converts to:
'{}'.format (1000000)