digitalmars.D - [SAoC2022] Replace libdparse with dmd-as-a-library in D-Scanner week 4
- Lucian Danescu (18/18) Oct 18 2022 Hello!
- rikki cattermole (3/5) Oct 18 2022 That wouldn't be a custom lexer, however you don't need to do that.
Hello! This week I added initial implementations for the following visitor: [imports_sortedness](https://github.com/Dlang-UPB/D-scanner/pull/28) Also created a [pull request](https://github.com/dlang/dmd/pull/14578) in `dmd` that adds an API in `ASTBase`, for the `Expression` class, to check if an expression is of a particular type. I am also exploring and planning to add an API that can store all the tokens in a file. Here there are 2 options: 1) I will have to create for my project a custom lexer that extends the `dmd` one, and 2) Updating the `dmd` lexer to have the possibility to store all the lexed tokens, maybe under `version(DMDLIB)`. What do you think, is that something worth having in `dmd`?
Oct 18 2022
On 19/10/2022 3:36 AM, Lucian Danescu wrote:1) I will have to create for my project a custom lexer that extends the `dmd` oneThat wouldn't be a custom lexer, however you don't need to do that. https://github.com/dlang/dmd/blob/master/compiler/test/dub_package/lexer.d
Oct 18 2022