py/lexer: Raise SyntaxError when unicode char point out of range.

This commit is contained in:
Damien George
2015-09-07 17:19:17 +01:00
parent 081f9325f5
commit 0be3c70cd8
2 changed files with 9 additions and 1 deletions

View File

@@ -20,3 +20,9 @@ print(enc, enc.decode() == s)
# printing of unicode chars using repr
# TODO we don't do this correctly
#print(repr(s))
# test invalid escape code
try:
eval('"\\U00110000"')
except SyntaxError:
print('SyntaxError')