Thread overview
Anyone familiar with libdparse?
Feb 08, 2023
ryuukk_
Feb 08, 2023
ryuukk_
Feb 09, 2023
RazvanN
Feb 09, 2023
RazvanN
Feb 09, 2023
WebFreak001
Feb 10, 2023
user1234
February 08, 2023

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

February 08, 2023

I created an issue on github: https://github.com/dlang-community/libdparse/issues/482

February 09, 2023

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?

February 09, 2023

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).

February 09, 2023

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)

February 10, 2023

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.