Skip to content

Commit 01258d4

Browse files
committed
parser: fix error handling for period in expressions
1 parent 79cb92f commit 01258d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

std/jule/parser/expr.jule

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,9 +945,11 @@ impl exprBuilder {
945945
f.Exception = self.p.buildScope(blockTokens, rbrace)
946946
x.End = rbrace
947947
| token::PERIOD:
948+
mut t := self.t
948949
self.next()
949950
if self.eof() {
950-
break
951+
self.pushErr(t, "expected selector or type assertion")
952+
ret nil
951953
}
952954
match self.t.ID {
953955
| token::NAME:

0 commit comments

Comments
 (0)