mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Parsing, semantic analysis, and lowering for and, or, not. (#2897)
Lowering for `and` and `or` is not yet complete because `Branch` lowering isn't done yet.
This commit is contained in:
@@ -310,12 +310,13 @@ auto ParseTree::Verify() const -> ErrorOr<Success> {
|
||||
prev_index = n.index;
|
||||
}
|
||||
|
||||
if (!has_errors_ &&
|
||||
static_cast<int32_t>(node_impls_.size()) != tokens_->size()) {
|
||||
if (!has_errors_ && static_cast<int32_t>(node_impls_.size()) !=
|
||||
tokens_->expected_parse_tree_size()) {
|
||||
return Error(
|
||||
llvm::formatv("ParseTree has {0} nodes and no errors, but "
|
||||
"TokenizedBuffer has {1} tokens.",
|
||||
node_impls_.size(), tokens_->size()));
|
||||
"TokenizedBuffer expected {1} nodes for {2} tokens.",
|
||||
node_impls_.size(), tokens_->expected_parse_tree_size(),
|
||||
tokens_->size()));
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user