Skip to content

Commit 508bdfa

Browse files
Fix parser for inserting with anonymous relation syntax (#440)
## Product change and motivation Fixes a bug in parsing for inserting with anonymous relation syntax
1 parent daee7bf commit 508bdfa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rust/parser/typeql.pest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ plays_constraint = { PLAYS ~ type_ref }
103103

104104
// THING STATEMENTS ============================================================
105105
statement_thing_basic = { var ~ COMMA? ~ thing_constraint_list }
106-
statement_thing_relation_anonymous = { type_ref? ~ relation ~ ( COMMA? ~ thing_constraint_list )? }
106+
statement_thing_relation_anonymous = { !reserved ~ type_ref? ~ relation ~ ( COMMA? ~ thing_constraint_list )? }
107107
thing_constraint_list = {thing_constraint ~ ( COMMA ~ thing_constraint )* ~ COMMA?}
108108

109109
thing_constraint = { isa_constraint | iid_constraint | has_constraint | links_constraint }
@@ -364,7 +364,7 @@ range_full = { range_bound ~ DOUBLE_DOT ~ range_bound }
364364
range_bound = _{ value_literal }
365365

366366
// TYPEQL SYNTAX KEYWORDS ======================================================
367-
// Unused / Reference only. See typeql::is_reserved_keyword for implemented truth.
367+
// Reference. See typeql::is_reserved_keyword for implemented truth.
368368
eof_reserved = { SOI ~ reserved ~ EOI }
369369
reserved = { WITH | MATCH | FETCH | UPDATE | DEFINE | UNDEFINE | REDEFINE | INSERT | PUT | DELETE | END
370370
| ENTITY | RELATION | ATTRIBUTE | ROLE

0 commit comments

Comments
 (0)