================================================================================
Empty string
================================================================================
''
c''
r''
""
c""
r""
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal)))
  (simple_statement
    (literal
      (c_string_literal)))
  (simple_statement
    (literal
      (raw_string_literal)))
  (simple_statement
    (literal
      (interpreted_string_literal)))
  (simple_statement
    (literal
      (c_string_literal)))
  (simple_statement
    (literal
      (raw_string_literal))))

================================================================================
Comments string
================================================================================
'//'
'/**/'
c'//'
c'/**/'
r'//'
r'/**/'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal)))
  (simple_statement
    (literal
      (interpreted_string_literal)))
  (simple_statement
    (literal
      (c_string_literal)))
  (simple_statement
    (literal
      (c_string_literal)))
  (simple_statement
    (literal
      (raw_string_literal)))
  (simple_statement
    (literal
      (raw_string_literal))))

================================================================================
Simple string interpolation
================================================================================
'Hello, ${name}!'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal
        (string_interpolation
          (interpolation_opening)
          (interpolation_expression
            (reference_expression
              (identifier)))
          (interpolation_closing))))))

================================================================================
Several string interpolations
================================================================================
'Hello, ${name} and ${other}!'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal
        (string_interpolation
          (interpolation_opening)
          (interpolation_expression
            (reference_expression
              (identifier)))
          (interpolation_closing))
        (string_interpolation
          (interpolation_opening)
          (interpolation_expression
            (reference_expression
              (identifier)))
          (interpolation_closing))))))

================================================================================
Simple escaped string interpolation
================================================================================
'Hello, \${name}!'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal
        (escape_sequence)))))

================================================================================
String interpolation at start
================================================================================
'${name}!'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal
        (string_interpolation
          (interpolation_opening)
          (interpolation_expression
            (reference_expression
              (identifier)))
          (interpolation_closing))))))

================================================================================
String interpolation at end
================================================================================
'${name}'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal
        (string_interpolation
          (interpolation_opening)
          (interpolation_expression
            (reference_expression
              (identifier)))
          (interpolation_closing))))))

================================================================================
String interpolation with complex expression
================================================================================
'Hello, ${name.foo()}!'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal
        (string_interpolation
          (interpolation_opening)
          (interpolation_expression
            (call_expression
              (selector_expression
                (reference_expression
                  (identifier))
                (reference_expression
                  (identifier)))
              (argument_list)))
          (interpolation_closing))))))

================================================================================
String interpolation with complex expressions and format specifiers
================================================================================
x := 123.4567
println('[${x:.2}]')
println('[${x:10}]')
println('[${int(x):-10}]')
println('[${int(x):010}]')
println('[${int(x):b}]')
println('[${int(x):o}]')
println('[${int(x):X}]')
println('[${10.0000:.2}]')
println('[${10.0000:+.2f}]')
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (var_declaration
      (expression_list
        (reference_expression
          (identifier)))
      (expression_list
        (literal
          (float_literal)))))
  (simple_statement
    (call_expression
      (reference_expression
        (identifier))
      (argument_list
        (argument
          (literal
            (interpreted_string_literal
              (string_interpolation
                (interpolation_opening)
                (interpolation_expression
                  (reference_expression
                    (identifier)))
                (format_specifier
                  (int_literal))
                (interpolation_closing))))))))
  (simple_statement
    (call_expression
      (reference_expression
        (identifier))
      (argument_list
        (argument
          (literal
            (interpreted_string_literal
              (string_interpolation
                (interpolation_opening)
                (interpolation_expression
                  (reference_expression
                    (identifier)))
                (format_specifier
                  (int_literal))
                (interpolation_closing))))))))
  (simple_statement
    (call_expression
      (reference_expression
        (identifier))
      (argument_list
        (argument
          (literal
            (interpreted_string_literal
              (string_interpolation
                (interpolation_opening)
                (interpolation_expression
                  (call_expression
                    (reference_expression
                      (identifier))
                    (argument_list
                      (argument
                        (reference_expression
                          (identifier))))))
                (format_specifier
                  (int_literal))
                (interpolation_closing))))))))
  (simple_statement
    (call_expression
      (reference_expression
        (identifier))
      (argument_list
        (argument
          (literal
            (interpreted_string_literal
              (string_interpolation
                (interpolation_opening)
                (interpolation_expression
                  (call_expression
                    (reference_expression
                      (identifier))
                    (argument_list
                      (argument
                        (reference_expression
                          (identifier))))))
                (format_specifier
                  (int_literal))
                (interpolation_closing))))))))
  (simple_statement
    (call_expression
      (reference_expression
        (identifier))
      (argument_list
        (argument
          (literal
            (interpreted_string_literal
              (string_interpolation
                (interpolation_opening)
                (interpolation_expression
                  (call_expression
                    (reference_expression
                      (identifier))
                    (argument_list
                      (argument
                        (reference_expression
                          (identifier))))))
                (format_specifier)
                (interpolation_closing))))))))
  (simple_statement
    (call_expression
      (reference_expression
        (identifier))
      (argument_list
        (argument
          (literal
            (interpreted_string_literal
              (string_interpolation
                (interpolation_opening)
                (interpolation_expression
                  (call_expression
                    (reference_expression
                      (identifier))
                    (argument_list
                      (argument
                        (reference_expression
                          (identifier))))))
                (format_specifier)
                (interpolation_closing))))))))
  (simple_statement
    (call_expression
      (reference_expression
        (identifier))
      (argument_list
        (argument
          (literal
            (interpreted_string_literal
              (string_interpolation
                (interpolation_opening)
                (interpolation_expression
                  (call_expression
                    (reference_expression
                      (identifier))
                    (argument_list
                      (argument
                        (reference_expression
                          (identifier))))))
                (format_specifier)
                (interpolation_closing))))))))
  (simple_statement
    (call_expression
      (reference_expression
        (identifier))
      (argument_list
        (argument
          (literal
            (interpreted_string_literal
              (string_interpolation
                (interpolation_opening)
                (interpolation_expression
                  (literal
                    (float_literal)))
                (format_specifier
                  (int_literal))
                (interpolation_closing))))))))
  (simple_statement
    (call_expression
      (reference_expression
        (identifier))
      (argument_list
        (argument
          (literal
            (interpreted_string_literal
              (string_interpolation
                (interpolation_opening)
                (interpolation_expression
                  (literal
                    (float_literal)))
                (format_specifier
                  (int_literal))
                (interpolation_closing)))))))))

================================================================================
C string literal
================================================================================
c'Hello, World!'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (c_string_literal))))

================================================================================
Raw string literal
================================================================================
r'Hello, World!'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (raw_string_literal))))

================================================================================
Raw string literal with interpolation
================================================================================
r'Hello, ${name}!'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (raw_string_literal))))

================================================================================
String literal with escape sequences
================================================================================
'Hello, \''
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal
        (escape_sequence)))))

================================================================================
String literal with identifier tokens
================================================================================
'$Hello'
'C.Hello $World'
'@Hello
$
JS.World'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal)))
  (simple_statement
    (literal
      (interpreted_string_literal)))
  (simple_statement
    (literal
      (interpreted_string_literal))))

================================================================================
String literal with interpolation after \n
================================================================================
'v fmt failed:\n\n${res.output}'
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (interpreted_string_literal
        (escape_sequence)
        (escape_sequence)
        (string_interpolation
          (interpolation_opening)
          (interpolation_expression
            (selector_expression
              (reference_expression
                (identifier))
              (reference_expression
                (identifier))))
          (interpolation_closing))))))

================================================================================
Raw String literal with \
================================================================================
r'\'
r"\"
--------------------------------------------------------------------------------

(source_file
  (simple_statement
    (literal
      (raw_string_literal)))
  (simple_statement
    (literal
      (raw_string_literal))))
