Issue-165 Added support for f-strings (literal string interpolation https://www.python.org/dev/peps/pep-0498/)

Opcodes handled: FORMAT_VALUE, BUILD_STRING.
Added AST node classes for FormattedValue and JoinedStr.
This commit is contained in:
Aralox
2020-10-17 20:52:57 +11:00
parent 9407b29451
commit 0c9fbd9caf
11 changed files with 257 additions and 24 deletions

View File

@@ -29,6 +29,6 @@ bool IsCompareArg(int opcode);
}
void print_const(PycRef<PycObject> obj, PycModule* mod);
void print_const(PycRef<PycObject> obj, PycModule* mod, const char* parent_f_string_quote = nullptr);
void bc_next(PycBuffer& source, PycModule* mod, int& opcode, int& operand, int& pos);
void bc_disasm(PycRef<PycCode> code, PycModule* mod, int indent);