E0002: unterminated string literal

View source

A string literal starts and ends with a double quote on the same line.

A string literal starts and ends with a double quote on the same line. The lexer reports this error when it reaches the end of the line or of the file before it finds the closing quote. A backslash that is the last character of the line is not an escape, so it leaves the literal unterminated as well. The error points at the opening quote.

Example

actus
verb main() {
    print(string: "hello);
}

Fix

Add the closing quote.

actus
verb main() {
    println(string: "hello");
}

Run actus explain E0002 in your terminal to read this entry offline. Browse Lexer & parser or all error codes.