2022-06-01 19:33:42 +02:00
|
|
|
================================================================================
|
2022-06-01 19:40:44 +02:00
|
|
|
nil literal
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
nil
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(nil_literal))
|
|
|
|
|
|
|
|
================================================================================
|
2022-06-01 19:33:42 +02:00
|
|
|
Integer literal
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(integer_literal))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
String literal
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
"Hello World!"
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(string_literal))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
String literal special character escapes
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
"Hello\nWorld!"
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(string_literal
|
|
|
|
(escape_sequence)))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
String literal octal
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
"Hello World\041"
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(string_literal
|
|
|
|
(escape_sequence)))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
String literal hex
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
"Hello World\x21"
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(string_literal
|
|
|
|
(escape_sequence)))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
String literal character escapes
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
"Hello\\\"World\""
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(string_literal
|
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence)))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Unterminated string literal
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(string_literal
|
|
|
|
(MISSING """)))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
String literal unterminated escape
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
"\"
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(string_literal
|
|
|
|
(escape_sequence)
|
|
|
|
(MISSING """)))
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
String literal invalid octal
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
"\399"
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(ERROR
|
|
|
|
(UNEXPECTED '9'))
|
|
|
|
(integer_literal)
|
|
|
|
(ERROR))
|