Skip to content

Commit 00bd7af

Browse files
committed
Fix parsing field to sink forwarding
1 parent 7f076c4 commit 00bd7af

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

corpus/unit.spicy

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ public type X = unit {
127127
sink data;
128128
};
129129

130+
type HeuristicContent = unit {
131+
: bytes &eod -> other.sink_;
132+
};
133+
130134
# Attributes on unit switch.
131135
type X = unit {
132136
switch ( 1 ) {

corpus/unit.spicy.expected

+4
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ public type X = unit {
150150
sink data;
151151
};
152152

153+
type HeuristicContent = unit {
154+
: bytes &eod -> other.sink_;
155+
};
156+
153157
# Attributes on unit switch.
154158
type X = unit {
155159
switch (1) {

src/query.scm

+2-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@
402402
; Enforce spaces around `->` in field sink syntax.
403403
(field_decl
404404
"->" @prepend_space @append_space
405-
(sink)
405+
.
406+
(expression)
406407
)
407408

408409
(field_decl

0 commit comments

Comments
 (0)