Skip to content
Playground(another site)

bynk.lex.unterminated_string

Error A string literal is not terminated.

An ordinary string literal, "…", closes on the line it opens on. This one reaches the end of the line with no closing ", so the lexer reports it at the opening quote and skips the rest of the line. Add the closing quote. For a line break in the value write \n, or use a multi-line string literal.

Example

const Greeting: String = "hello // ✗ no closing quote
const Greeting: String = "hello" // ✓

In the Book

See also

  • The grammar rule it governs: string_literal.
  • Every code in its category, Lexer, on the diagnostic index.
  • bynk explain bynk.lex.unterminated_string shows the same from the installed toolchain, without a network.