From 4626616b14bc73d54ee09abc5264fc628bfc9412 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Tue, 3 Feb 2026 23:02:04 -0700 Subject: [PATCH] Fixing parsing when we have `a b {}`. that should be applying a to b and {}. instead it was applying b to {} --- src/parser.ts | 4 ---- src/textinput-test.cg | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/parser.ts b/src/parser.ts index 5d5af23..db8e956 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -364,10 +364,6 @@ export class Parser { const field = (fieldToken as { value: string }).value; expr = { kind: 'record-access', record: expr, field }; } - } else if (this.current().kind === 'open-brace') { - // Function / constructor application - const record = this.parsePrimary(); - expr = { kind: 'apply', func: expr, args: [record] }; } else { break; } diff --git a/src/textinput-test.cg b/src/textinput-test.cg index ab03d03..62911e2 100644 --- a/src/textinput-test.cg +++ b/src/textinput-test.cg @@ -29,13 +29,13 @@ view = state viewport \ child = Column { gap = 10, children = [ - (textInput2.view state.email) { + textInput2.view state.email { focused = state.focusedInput == "email", onFocus = FocusEmail, w = 300, h = 40 }, - (textInput2.view state.password) { + textInput2.view state.password { focused = state.focusedInput == "password", onFocus = FocusPassword, w = 300,