www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Anyone familiar with libdparse?

reply ryuukk_ <ryuukk.dev gmail.com> writes:
Hello,

I am currently working on template support for DCD [1], i made 
some good progress so far

I'm however currently stuck because libdparse seems incomplete, 
some information related to `AutoDeclaration` seems missing, 
there is a TODO note on libdparse, so i guess someone forgot 
about it [2]

If you are familiar with libdparse code base and are willing to 
help, please let me know!

Thanks!




[1] - https://github.com/dlang-community/DCD/pull/709

[2] - 
https://github.com/dlang-community/libdparse/blob/master/src/dparse/ast.d#L3431
Feb 08 2023
next sibling parent reply ryuukk_ <ryuukk.dev gmail.com> writes:
I created an issue on github: 
https://github.com/dlang-community/libdparse/issues/482
Feb 08 2023
parent reply RazvanN <razvan.nitu1305 gmail.com> writes:
On Wednesday, 8 February 2023 at 21:20:16 UTC, ryuukk_ wrote:
 I created an issue on github: 
 https://github.com/dlang-community/libdparse/issues/482
Have you considered using dmd-as-a-lib instead of libdparse?
Feb 09 2023
parent RazvanN <razvan.nitu1305 gmail.com> writes:
On Thursday, 9 February 2023 at 11:35:56 UTC, RazvanN wrote:
 On Wednesday, 8 February 2023 at 21:20:16 UTC, ryuukk_ wrote:
 I created an issue on github: 
 https://github.com/dlang-community/libdparse/issues/482
Have you considered using dmd-as-a-lib instead of libdparse?
Ah sorry, I misread, you want to update DCD. We are working on a different project which strives to replace libdparse in D-Scanner. I think that it would be great if we could replace libdparse in DCD, but AFAIK DCD also uses some semantic analysis (dsymbol package).
Feb 09 2023
prev sibling parent reply WebFreak001 <d.forum webfreak.org> writes:
On Wednesday, 8 February 2023 at 20:41:31 UTC, ryuukk_ wrote:
 Hello,

 I am currently working on template support for DCD [1], i made 
 some good progress so far

 I'm however currently stuck because libdparse seems incomplete, 
 some information related to `AutoDeclaration` seems missing, 
 there is a TODO note on libdparse, so i guess someone forgot 
 about it [2]

 If you are familiar with libdparse code base and are willing to 
 help, please let me know!

 Thanks!




 [1] - https://github.com/dlang-community/DCD/pull/709

 [2] - 
 https://github.com/dlang-community/libdparse/blob/master/src/dparse/ast.d#L3431
that TODO refers to the visitor. You are also inside UnaryExpression there, which is just the value. If you are looking for stuff from the AutoDeclaration, you need to look there. For debugging you can use `dscanner --ast < code.d` to generate an XML output of most of the AST. (note: this is sometimes incomplete and does not always include all the fields that are actually in memory)
Feb 09 2023
parent user1234 <user1234 12.de> writes:
On Thursday, 9 February 2023 at 11:57:50 UTC, WebFreak001 wrote:
 On Wednesday, 8 February 2023 at 20:41:31 UTC, ryuukk_ wrote:
 Hello,

 I am currently working on template support for DCD [1], i made 
 some good progress so far

 I'm however currently stuck because libdparse seems 
 incomplete, some information related to `AutoDeclaration` 
 seems missing, there is a TODO note on libdparse, so i guess 
 someone forgot about it [2]

 If you are familiar with libdparse code base and are willing 
 to help, please let me know!

 Thanks!




 [1] - https://github.com/dlang-community/DCD/pull/709

 [2] - 
 https://github.com/dlang-community/libdparse/blob/master/src/dparse/ast.d#L3431
that TODO refers to the visitor.
That's nonetheless a valid issue that was already rised: https://github.com/dlang-community/libdparse/issues/409 The unaries are just not sub-classed.
Feb 10 2023