Comments (5)
First of all I think it is exciting thay you want to use vhdl_lang
for generating documentation. I created the library with the hope that other people would build tools such as document generators upon the library. I will happily support with feedback on ideas and reviewing code. Since I work on this on my spare time the response might sometimes be delayed when other things in life take priority.
Just so you know @Schottkyc137 has also been interested in the topic of adding more token information to the AST.
Regarding adding token references I very much prefer option 1 since the WithTokenRef<T>
just complicates the type hierarchy too much. It is better to add the fields to the current AST-nodes that need them directly without wrapping the type. If you want to process the different nodes that can have start and end token with unified code I would instead add a trait:
trait HasTokenSpan {
fn start_token(&self) -> TokenId;
fn end_token(&self) -> TokenId;
}
from rust_hdl.
Since I work on this on my spare time the response might sometimes be delayed when other things in life take priority.
Yeah, no problem there.
Just so you know @Schottkyc137 has also been interested in the topic of adding more token information to the AST.
I see. Seems like his work is the sort of thing I have in mind for other elements too.
If you want to process the different nodes that can have start and end token with unified code I would instead add a trait
I will play around with it as soon as I have time and see what I can do. Ideally I would want generalize as much as possible and maybe even combine my changes with what @Schottkyc137 has already done for UseClause
etc. When I have a working proof of concept I will create a PR.
from rust_hdl.
I implemented the trait approach with added start/end token fields in #211. The implementation is done using macros to avoid code duplication as much as possible.
from rust_hdl.
Just so you know I have not focused on creating a nice public API for vhdl_lang
. I think if you start creating a document generator as a third party crate on top of vhdl_lang
it could serve as a nice pioneer in helping us establish I nice public API. I think we have the embryo of a nice api in the ASTNode and Visitor trait created by @Schottkyc137 but I would like to tweak it a bit to not require heap-allocation to traverse the AST.
from rust_hdl.
Since the relevant PR is already merged, I will close this issue.
from rust_hdl.
Related Issues (20)
- Enhancement: Improve cyclic dependency check to allow recursive instantiation HOT 1
- [Feature Request] Recursive Symbol Hover extraction
- In the readme.md add a description how to install VHDL_LS for Neovim HOT 1
- Error in `float_generic_pkg-body.vhd`
- Generic Library Inclusion HOT 2
- Getting errors for `ieee2008/float_generic_pkg-body.vhdl` HOT 3
- Support for VHDL-2019 HOT 2
- [Issue] Support for incremental sync HOT 1
- [BUG] File paths with $ are incorrectly being interpreted as environment variables HOT 2
- Support for VHDL-2019
- Autocompletion in concurrent statements broken (VSCode) HOT 4
- Signal of record type connected to input/output port of same record type reports a mismatch HOT 3
- Unused lint not available in vhdl_lang HOT 3
- Configurable lint settings for third party libraries HOT 3
- VHDL-LS does not appear in the Mason LSP list when searching for VHDL HOT 1
- Neovim on Mac OS cannot find vhdl_library exception and VHDL LS doesn't function HOT 2
- Adding autoformatting HOT 5
- [BUG] Warning reported regarding unused generic procedures/functions HOT 2
- [Clarification] No warning reported if object is not set HOT 2
- Panic when (seemingly) completing a port name HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust_hdl.