-
Notifications
You must be signed in to change notification settings - Fork 226
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
[VeriblePreProcessor][2]: Positional arguments to pass defines and inclusion directories. #1373
[VeriblePreProcessor][2]: Positional arguments to pass defines and inclusion directories. #1373
Conversation
…o generate all variants with the new mode generate-variants
…ass for the moment.
"verible::CmdPositionalArguments" class only supports these types so far: SV files, +define+<name>[=<value>], and +incdir+<dir>.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we use your code to parse things into a struct FileList
(and add a container in there for the defines), we have a good starting point to use it for all tools.
- Using FileList in the preprocessor tool instead of CmdPositionalArguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Make sure to add a unit test. Also, use absl::string_view where possible, avoid std::string unless you actually need a copy of the data.
Here the first start would of course to rebase to current head. But since there are a lot of changes that you essentially have to integrate, and this one is a somewhat independent (just the commandline changes), it might be easier if you start a fresh pull request: you just copy over the Up to you. |
That would be easier, I am on it. |
NOTE: This is a part of the sequentially splitted PRs from PR #1360.
Description:
This PR implements a class that handles positional arguments for the preprocessor tool.
Any of the following positional argument can be passed one or more times.
`define foo text
`include "file_name"