Syntax & Comments
Grammar rules, statement delimiters, and comment syntax in NouvaLang.
1. Semicolons and Statements
Statements in NouvaLang end with a semicolon (;):
let x: int = 10;
let y: int = 20;
print(x + y);
2. Single-line Comments
Single-line comments begin with // and extend to the end of the line:
// This is a single-line comment
let app_name: str = "NouvaLang"; // Inline comment
3. Multi-line Block Comments
Block comments are enclosed between /* and */:
/*
This is a multi-line block comment.
Useful for writing algorithm explanations,
documentation headers, and license notes.
*/
let active: bool = true;
4. String Literals and Escape Sequences
Strings are delimited by double quotes ("...") and support standard escape sequences:
| Escape Sequence | Result |
|---|---|
\n | Newline |
\t | Tab |
\" | Escaped double quote |
\\ | Escaped backslash |