style: align multiline expressions and guards

This commit is contained in:
2026-10-07 23:28:26 +02:00
parent 313947acd8
commit 8352cc1ab0
4 changed files with 42 additions and 26 deletions
+10 -5
View File
@@ -246,11 +246,16 @@ ScanIdentResult :: struct {
@hide:file
scan_ident proc(start usize, program []u8) ScanIdentResult {
cursor := start + 1
while (cursor < program.len and (
is_alpha(program[cursor]) or
is_digit(program[cursor]) or
program[cursor] == '_'
)) cursor += 1
while (
cursor < program.len
and (
is_alpha(program[cursor])
or is_digit(program[cursor])
or program[cursor] == '_'
)
) {
cursor += 1
}
# don't intern keywords (already O(1) lookup via token kind)
kind :: strmap.get(&keywords, program[start..cursor]) orelse .ident