You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7256f27
Browse filesBrowse the repository at this point in the historyBrowse files
// // TODO: this check does not make any sense when there are several chat commands
1425
-
// // But I still want to have some sort of sanity check for chat_offsets
1426
-
// if len(context.chunks) > 0 {
1427
-
// fmt.Printf("%s: ERROR: chat offset should be applied after `chat` commands but before any `chunks` commands. This is due to `chunk` commands making copies of the chat slices that are not affected by the consequent chat offsets\n", token.Loc);
1428
-
// return false;
1429
-
// }
1430
+
ifcontext.chatsLoaded==0 {
1431
+
fmt.Printf("%s: ERROR: chat pins should be applied after a `chat` command. Otherwise they are applied to nothing.\n", token.Loc)
1432
+
returnfalse
1433
+
}
1434
+
ifcontext.chunksDefinedForCurrentInput>0 {
1435
+
fmt.Printf("%s: ERROR: chat pins should be applied before any `chunk` commands within a single `input`. This is due to `chunk` commands making copies of the chat slices that are not affected by the consequent chat pins\n", token.Loc);
1436
+
returnfalse
1437
+
}
1438
+
// TODO: it's important that chat offsets are applied in the sorted order and do not overlap.
1439
+
// Maybe the language should enforce that somehow.
0 commit comments