3 ms·
Just read the code for an existing one like: https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d https://github.com/dlang/dmd/blob/master/src/dmd/cparse.
by WalterBright 5y ago
Just read the code for an existing one like:
https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d
which is a C parser. It's not hard to follow.