Skip to content

Commit

Permalink
Explicitly define wire/reg toSTring
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Aug 8, 2019
1 parent 32e8659 commit 660db7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/verilogAST.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ class Wire : public Declaration {
std::unique_ptr<Slice>, std::unique_ptr<Vector>>
value)
: Declaration(std::move(value), "wire"){};
std::string toString();
~Wire(){};
};

Expand All @@ -349,6 +350,7 @@ class Reg : public Declaration {
std::unique_ptr<Slice>, std::unique_ptr<Vector>>
value)
: Declaration(std::move(value), "reg"){};
std::string toString();
~Reg(){};
};

Expand Down
3 changes: 3 additions & 0 deletions src/verilogAST.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ std::string Declaration::toString() {
return decl + " " + variant_to_string(value) + ";";
}

std::string Wire::toString() { return Declaration::toString(); }
std::string Reg::toString() { return Declaration::toString(); }

std::string Assign::toString() {
return prefix + variant_to_string(target) + " " + symbol + " " +
value->toString() + ";";
Expand Down

0 comments on commit 660db7f

Please sign in to comment.