octal over 255 illegal example

I was curious of the behavior referring to octal values over 255.  It wasn't clear if the expected behavior was a compile error, if value would be encoded as two characters, or if it would be capped at 255.  

This example explicitly show that octal values over 255 are illegal.
This commit is contained in:
Zach Collier 2022-04-01 16:03:32 -06:00 committed by GitHub
parent 67d6a51065
commit f6bef0379f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -529,6 +529,7 @@ escaped_char = `\` ( "a" | "b" | "f" | "n" | "r" | "t" | "v" | `\` | "'" | `
'aa' // illegal: too many characters
'\xa' // illegal: too few hexadecimal digits
'\0' // illegal: too few octal digits
'\400' // illegal: octal value over 255
'\uDFFF' // illegal: surrogate half
'\U00110000' // illegal: invalid Unicode code point
</pre>