Skip to content

Commit

Permalink
Add some comments to make the context make sense
Browse files Browse the repository at this point in the history
  • Loading branch information
evantypanski committed Jan 29, 2025
1 parent 0fdcd68 commit a433d61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion analyzer/resp.spicy
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const MAX_SIZE = 1024 * 1024;
const MAX_RECURSION_DEPTH = 20;

public type ClientMessages = unit {
# The context here refers to whether we saw client data first. It is a one-time switch,
# either we have seen client data or not.
%context = bool;
on %init {
*self.context() = True;
Expand All @@ -21,7 +23,7 @@ public type ServerMessages = unit {
%context = bool;
on %init {
if (!*self.context()) {
throw "Server responses must come after a client request is parsed";
throw "Server responses must come after a client request is seen";
}
}
: (ServerData &synchronize)[];
Expand Down

0 comments on commit a433d61

Please sign in to comment.