Skip to content

Commit

Permalink
Merge branch 'autofix_always_ff_non_blocking' of github.com:IEncinas1…
Browse files Browse the repository at this point in the history
…0/verible into autofix_always_ff_non_blocking
  • Loading branch information
IEncinas10 committed Jul 6, 2023
2 parents 0f21ce0 + 6f5efe8 commit 845b5c9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions verilog/CST/expression.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ std::vector<TreeSearchMatch> FindAllConditionExpressions(
}

std::vector<TreeSearchMatch> FindAllReferenceFullExpressions(
const verible::Symbol& root) {
const verible::Symbol &root) {
auto references = verible::SearchSyntaxTree(root, NodekReference());
auto reference_calls =
verible::SearchSyntaxTree(root, NodekReferenceCallBase());
for (auto& reference : references) {
for (auto &reference : references) {
if (!(reference.context.DirectParentIs(NodeEnum::kReferenceCallBase))) {
reference_calls.emplace_back(reference);
}
Expand Down Expand Up @@ -169,19 +169,19 @@ static const verible::TokenInfo *ReferenceBaseIsSimple(
: nullptr;
}

const verible::TokenInfo* ReferenceIsSimpleIdentifier(
const verible::Symbol& reference) {
const verible::TokenInfo *ReferenceIsSimpleIdentifier(
const verible::Symbol &reference) {
// remove calls since they are not simple - but a ReferenceCallBase can be
// just a reference, depending on where it is placed in the code
if (reference.Tag().tag == (int)NodeEnum::kReferenceCallBase) return nullptr;
const auto& reference_node(
const auto &reference_node(
verible::CheckSymbolAsNode(reference, NodeEnum::kReference));
// A simple reference contains one component without hierarchy, indexing, or
// calls; it looks like just an identifier.
if (reference_node.children().size() > 1) return nullptr;
const auto &base_symbol = reference_node.children().front();
if (!base_symbol) return nullptr;
const auto& base_node = verible::SymbolCastToNode(*base_symbol);
const auto &base_node = verible::SymbolCastToNode(*base_symbol);
if (!base_node.MatchesTag(NodeEnum::kLocalRoot)) return nullptr;
return ReferenceBaseIsSimple(base_node);
}
Expand Down

0 comments on commit 845b5c9

Please sign in to comment.