This commit is contained in:
Aralox 2020-10-20 16:42:19 +11:00
commit 7af40a779f
6 changed files with 19 additions and 23 deletions

View file

@ -79,11 +79,3 @@ const char* ASTBlock::type_str() const
};
return s_type_strings[blktype()];
}
/* ASTFormattedValue */
// This must be a triple quote (''' or """), to handle interpolated string literals containing the opposite quote style.
// E.g. f'''{"interpolated "123' literal"}''' -> valid.
// E.g. f"""{"interpolated "123' literal"}""" -> valid.
// E.g. f'{"interpolated "123' literal"}' -> invalid, unescaped quotes in literal.
// E.g. f'{"interpolated \"123\' literal"}' -> invalid, f-string expression does not allow backslash.
// NOTE: Nested f-strings not supported.
const char* ASTFormattedValue::F_STRING_QUOTE = "'''";