Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] adding exit code to the preprocessor #1533

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions verilog/preprocessor/verilog_preprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <stack>
#include <string>
#include <vector>
#include <bitset>

#include "absl/status/status.h"
#include "absl/status/statusor.h"
Expand Down Expand Up @@ -87,6 +88,10 @@ struct VerilogPreprocessData {
// are two separate vectors.
std::vector<VerilogPreprocessError> errors;
std::vector<VerilogPreprocessError> warnings;

// An exit code of 4 bits is used to distinguish between errors met during
// preprocessing.
std::bitset<4> exit_code;
karimtera marked this conversation as resolved.
Show resolved Hide resolved
};

// VerilogPreprocess transforms a TokenStreamView.
Expand Down