Revise and hopefully improve 3.6+ fstring handling

This commit is contained in:
rocky
2019-05-08 06:03:39 -04:00
parent 393e5c9303
commit 733a44e22f
6 changed files with 156 additions and 79 deletions

View File

@@ -252,7 +252,8 @@ class Python36Parser(Python35Parser):
rules_str = """
expr ::= fstring_multi
fstring_multi ::= joined_str BUILD_STRING
joined_str ::= formatted_value+
fstr ::= expr
joined_str ::= fstr+
fstring_multi ::= %s BUILD_STRING
%s ::= %sBUILD_STRING
""" % (joined_str_n, joined_str_n, "formatted_value " * v)