Fixing parsing when we have a b {}. that should be applying a to b and {}. instead it was applying b to {}

This commit is contained in:
Dustin Swan 2026-02-03 23:02:04 -07:00
parent a9e10b3123
commit 4626616b14
No known key found for this signature in database
GPG key ID: 30D46587E2100467
2 changed files with 2 additions and 6 deletions

View file

@ -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;
}

View file

@ -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,