Skip to content

Commit

Permalink
fix parser
Browse files Browse the repository at this point in the history
  • Loading branch information
eladb committed Jun 30, 2023
1 parent 5055f82 commit 7d9a7d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/wingc/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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),
Expand All @@ -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),
}
}

Expand Down

0 comments on commit 7d9a7d2

Please sign in to comment.