fix: Don't create empty path nodes

This commit is contained in:
Lukas Wirth 2024-12-04 06:49:27 +01:00
parent b6fc9c14ac
commit caba872f88
6 changed files with 26 additions and 24 deletions

View file

@ -3,10 +3,7 @@ SOURCE_FILE
VISIBILITY
PUB_KW "pub"
L_PAREN "("
PATH
PATH_SEGMENT
ERROR
R_PAREN ")"
R_PAREN ")"
WHITESPACE " "
STRUCT_KW "struct"
WHITESPACE " "
@ -15,4 +12,3 @@ SOURCE_FILE
SEMICOLON ";"
WHITESPACE "\n"
error 4: expected identifier
error 5: expected R_PAREN

View file

@ -4,7 +4,6 @@ SOURCE_FILE
BANG "!"
L_BRACK "["
META
PATH
R_BRACK "]"
WHITESPACE "\n"
ATTR
@ -55,7 +54,6 @@ SOURCE_FILE
L_BRACK "["
META
UNSAFE_KW "unsafe"
PATH
R_BRACK "]"
WHITESPACE "\n"
ATTR
@ -65,7 +63,6 @@ SOURCE_FILE
META
UNSAFE_KW "unsafe"
WHITESPACE " "
PATH
EQ "="
R_BRACK "]"
WHITESPACE "\n"
@ -80,7 +77,7 @@ error 41: expected L_PAREN
error 41: expected identifier
error 41: expected R_PAREN
error 52: expected L_PAREN
error 53: expected identifier
error 52: expected identifier
error 54: expected expression
error 54: expected expression
error 54: expected R_PAREN