Skip to content

Commit 457209b

Browse files
fix(affine): migrate record literals to #{ } (affinescript#218) (#21)
affinescript#218 (merged): bare { = block, records use #{ }. Migrated 9 expression-position record literals (route Model constructions) in nqc_gui.affine; verified each #{ opens a real field record and the file parses clean under the new compiler. Patterns/blocks unchanged. Refs hyperpolymath/affinescript#218 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 515f2a3 commit 457209b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

nqc/src/ui/tea/nqc_gui.affine

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ enum Msg {
6565
// ── TEA Logic ────────────────────────────────────────────────────────────────
6666

6767
fn nqc_init() -> Model {
68-
{
68+
#{
6969
route: Route::Picker,
7070
query_text: "",
7171
active_db_id: "",
@@ -81,7 +81,7 @@ fn nqc_update(@linear msg: Msg, @linear model: Model) -> Model {
8181
{ route: r, query_text: q, active_db_id: db, connection: c, format: f, dt_enabled: dt, history_depth: h } => {
8282
match msg {
8383
Navigate(new_route) => {
84-
{
84+
#{
8585
route: new_route,
8686
query_text: q,
8787
active_db_id: db,
@@ -93,7 +93,7 @@ fn nqc_update(@linear msg: Msg, @linear model: Model) -> Model {
9393
}
9494

9595
UpdateQuery(new_text) => {
96-
{
96+
#{
9797
route: r,
9898
query_text: new_text,
9999
active_db_id: db,
@@ -105,7 +105,7 @@ fn nqc_update(@linear msg: Msg, @linear model: Model) -> Model {
105105
}
106106

107107
SelectDatabase(new_db) => {
108-
{
108+
#{
109109
route: Route::Query(new_db),
110110
query_text: q,
111111
active_db_id: new_db,
@@ -119,7 +119,7 @@ fn nqc_update(@linear msg: Msg, @linear model: Model) -> Model {
119119
SubmitQuery => {
120120
// In a real implementation, this would trigger a Command.
121121
// For the TEA model, we update the connection state.
122-
{
122+
#{
123123
route: r,
124124
query_text: q,
125125
active_db_id: db,
@@ -131,7 +131,7 @@ fn nqc_update(@linear msg: Msg, @linear model: Model) -> Model {
131131
}
132132

133133
SetFormat(new_format) => {
134-
{
134+
#{
135135
route: r,
136136
query_text: q,
137137
active_db_id: db,
@@ -143,7 +143,7 @@ fn nqc_update(@linear msg: Msg, @linear model: Model) -> Model {
143143
}
144144

145145
ToggleDt => {
146-
{
146+
#{
147147
route: r,
148148
query_text: q,
149149
active_db_id: db,
@@ -156,7 +156,7 @@ fn nqc_update(@linear msg: Msg, @linear model: Model) -> Model {
156156

157157
PopState => {
158158
if h > 0 {
159-
{
159+
#{
160160
route: Route::Picker,
161161
query_text: q,
162162
active_db_id: "",
@@ -166,7 +166,7 @@ fn nqc_update(@linear msg: Msg, @linear model: Model) -> Model {
166166
history_depth: h - 1
167167
}
168168
} else {
169-
{
169+
#{
170170
route: r,
171171
query_text: q,
172172
active_db_id: db,

0 commit comments

Comments
 (0)