MikePopoloski / slang

SystemVerilog compiler and language services
MIT License
620 stars 138 forks source link

Adds a possibility to access the first Token of a SyntaxNode. #900

Closed suzizecat closed 8 months ago

suzizecat commented 8 months ago

Discussed in https://github.com/MikePopoloski/slang/discussions/898

As discussed, there would be a need to write-access in a generic fashion the first token of any SyntaxNode.

I am willing to try and implement it myself.

In order to not disrupt the current features would be to:

Could I have a confirmation that this is the right approach ?

MikePopoloski commented 8 months ago

Yes, that sounds right. I think you'll want it to be a pointer, so TokenPtrOrSyntax probably.

suzizecat commented 8 months ago

Ok, thanks for the pointers. I may not have much time in the next week, but I'll have a look into this 🙂