Should a parser type be a struct or class?

welkam wwwelkam at gmail.com
Thu Jun 18 15:40:43 UTC 2020


On Wednesday, 17 June 2020 at 14:32:09 UTC, Adam D. Ruppe wrote:
> On Wednesday, 17 June 2020 at 14:24:01 UTC, Stefan Koch wrote:
>> Parser in dmd does even inherit from Lexer.
>
> why would a parser ever inherit from a lexer?

So you can write nextToken() instead of lexer.nextToken()


More information about the Digitalmars-d-learn mailing list