Skip to content

lexer: own is a keyword only after for - #311

Merged
shreeve merged 1 commit into
mainfrom
contextual-own
Sep 16, 2026
Merged

shreeve merged 1 commit into
mainfrom
contextual-own

Conversation

@shreeve

@shreeve shreeve commented Sep 16, 2026

Copy link
Copy Markdown
Owner

own scans as a keyword only directly after for, the one position the grammar reads it, the same contextual rule from already follows after yield. Everywhere else it is an ordinary identifier, so a variable, parameter, function or property may be named own. The for own k, v of filter is unchanged.

No grammar change: parser byte-identical, corpus unchanged, browser bundle regenerated under Bun 1.4.0.

Five new battery rows in loops.rip. Language battery 3263 passing, toolchain gates 661 passing, full test:all suite green across all 26 lanes.

`own` scans as the OWN token only directly after FOR, the one position
the grammar reads it; everywhere else it is an ordinary identifier, so
a variable, parameter, function or property may be named own. The
for…of filter is unchanged.

No grammar change: the parser is byte-identical and the corpus is
unchanged. The browser bundle is regenerated under the pinned Bun.

Battery: five rows in loops.rip pin own as a variable, parameter,
property and function name, the own filter, and a for-own loop with
an own variable in scope.
@shreeve
shreeve merged commit e3484b3 into main Sep 16, 2026
2 checks passed
@shreeve
shreeve deleted the contextual-own branch September 16, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant