Documentation
¶
Index ¶
Constants ¶
View Source
const UnterminatedString = "unterminated string literal"
UnterminatedString is the literal of the ILLEGAL token for a string literal with no closing quote.
Variables ¶
This section is empty.
Functions ¶
func AppendEscape ¶ added in v0.28.0
AppendEscape decodes the escape sequence starting at the backslash s[i], writes the result to b and returns the index just past it. Sequences that are not escapes (\d, \N{...}, an incomplete \x) are kept as written, as Python keeps unknown escapes.
func UnescapeString ¶ added in v0.28.0
UnescapeString decodes Python escape sequences in a string literal's content. In bytesMode, \x and octal escapes give raw bytes and \u, \U and \N are not escapes (as in a bytes literal).
Types ¶
Click to show internal directories.
Click to hide internal directories.