7 Commits

Author SHA1 Message Date
b0cbe42fc4 lang: lex: add support for kebab-case identifiers and negative numbers
identifiers can now contain hyphens, with the following restrictions:
 * an identifier cannot start or end with a hyphen.
 * an identifier cannot contain more than one hyphen in a row.

kebab-case identifiers can be used for type and variable names, as well
as message identifiers and labels.

to avoid ambiguity, the lexer now enforces whitespace around most binary
operators (with a few exceptions, such as semicolons). trying to
compile a "compact" arithmetic expression, such as

	y=1+2

will now result in a "missing whitespace" error.
2025-11-07 09:49:29 +00:00
4386965cd9 lang: update bluelib api usage 2025-11-06 10:38:32 +00:00
a28874145c lang: lex: add diagnostic support 2025-05-08 20:31:55 +01:00
1c3aff9ad3 lang: add start/end coordinates to lexer tokens 2025-04-28 22:53:21 +01:00
f524899da4 lang: lex: convert lexer token queue to b_queue 2024-11-24 16:12:06 +00:00
6f06f42953 lang: add missing includes 2024-11-22 22:30:26 +00:00
881f345bbe lang: lex: move structure definitions to a separate header 2024-11-19 15:22:16 +00:00