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

master
Dustin Swan 3 days ago
parent a9e10b3123
commit 4626616b14
Signed by: dustinswan
GPG Key ID: 30D46587E2100467

@ -364,10 +364,6 @@ export class Parser {
const field = (fieldToken as { value: string }).value; const field = (fieldToken as { value: string }).value;
expr = { kind: 'record-access', record: expr, field }; 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 { } else {
break; break;
} }

@ -29,13 +29,13 @@ view = state viewport \
child = Column { child = Column {
gap = 10, gap = 10,
children = [ children = [
(textInput2.view state.email) { textInput2.view state.email {
focused = state.focusedInput == "email", focused = state.focusedInput == "email",
onFocus = FocusEmail, onFocus = FocusEmail,
w = 300, w = 300,
h = 40 h = 40
}, },
(textInput2.view state.password) { textInput2.view state.password {
focused = state.focusedInput == "password", focused = state.focusedInput == "password",
onFocus = FocusPassword, onFocus = FocusPassword,
w = 300, w = 300,

Loading…
Cancel
Save