Skip to content

fix(flowc): keyword field names in struct literal detection - #455

Merged
godofecht merged 1 commit into
mainfrom
work4
Aug 12, 2026
Merged

godofecht merged 1 commit into
mainfrom
work4

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Summary

The struct literal lookahead checked TOK_IDENT after { to decide if Type { ... } is a struct literal. Keyword field names like unit: f32 were TOK_KEYWORD, not TOK_IDENT, so the detection failed and the parser errored.

Now accepts both TOK_IDENT and TOK_KEYWORD in the lookahead and in the struct literal field parser.

Fixes ui_layout.flow struct literal with unit field.

Test plan

  • Self-host fixed-point passes (byte-identical)
  • Self-compile audit: all compiler/src modules pass
  • Roundtrip: all checks pass

This pull request includes code written with the assistance of AI.
The code has not yet been reviewed by a human.

Generated with Devin

The struct literal lookahead checked TOK_IDENT after { to decide
if Type { ... } is a struct literal. Keyword field names like
unit: f32 were TOK_KEYWORD, not TOK_IDENT, so the detection failed
and the parser errored.

Now accepts both TOK_IDENT and TOK_KEYWORD in the lookahead.

Fixes ui_layout.flow struct literal with unit field.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@godofecht
godofecht merged commit 296d994 into main Aug 12, 2026
15 checks passed
@godofecht
godofecht deleted the work4 branch August 12, 2026 15:31
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