From 7d9a7d224097344cd8f653711b945b37478dacbf Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Fri, 30 Jun 2023 22:24:29 +0300 Subject: [PATCH] fix parser --- libs/wingc/src/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/wingc/src/parser.rs b/libs/wingc/src/parser.rs index d49fbb1ccac..81ad87b5082 100644 --- a/libs/wingc/src/parser.rs +++ b/libs/wingc/src/parser.rs @@ -1018,7 +1018,7 @@ impl<'s> Parser<'s> { if last_child.kind() == "." { // even though we're missing a field, we can still parse the rest of the type - let _ = self.add_error::<()>("Expected namespaced type", &last_child); + self.add_error("Expected namespaced type", &last_child); } let mut cursor = type_node.walk(); @@ -1036,7 +1036,7 @@ impl<'s> Parser<'s> { "mutable_container_type" | "immutable_container_type" => { let container_type = self.node_text(&type_node.child_by_field_name("collection_type").unwrap()); match container_type { - "ERROR" => self.add_error("Expected builtin container type", type_node)?, + "ERROR" => self.with_error("Expected builtin container type", type_node)?, builtin => { let udt = UserDefinedType { root: Symbol::global(WINGSDK_STD_MODULE), @@ -1050,7 +1050,7 @@ impl<'s> Parser<'s> { } } } - other => self.add_error(format!("Expected class. Found {}", other), type_node), + other => self.with_error(format!("Expected class. Found {}", other), type_node), } }