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

support for Include statements #6

Open
priyavadan opened this issue Mar 28, 2020 · 2 comments
Open

support for Include statements #6

priyavadan opened this issue Mar 28, 2020 · 2 comments

Comments

@priyavadan
Copy link
Member

Our internal STIL files make use of including information from different files using the "Include" statement supported by the STIL spec.

I would like to see support for it in the current implementation. Thanks!

@priyavadan
Copy link
Member Author

current implementation of this in the feature/include_statement branch.

@ginty
Copy link
Member

ginty commented Mar 30, 2020

Thanks for the work on this.
It does seem little strange to be handling on_include within the individual processors.
For O2, there is a dedicated processor just for this - https://github.com/Origen-SDK/o2/blob/stil/rust/origen/src/generator/stil/processors/includer.rs
So once we have parsed a top-level file into an AST, the first thing we do is then run it through the include processor (recursively) to replace all include nodes with the AST from the file they are pointing to.
Could that approach not be used here too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants