https://issues.dlang.org/show_bug.cgi?id=14640
Issue ID: 14640
Summary: Special grammar for skipping unittest blocks
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
A recent pull request:
https://github.com/D-Programming-Language/dmd/pull/4704
reduces memory consumed by parsing unittest blocks that are subsequently
ignored. A further refinement to that suggested by Andrei was to switch to a
specialized grammar for it, that only recognizes:
. {
. }
. comments
. string literals
. anything else
so it can lex much faster, i.e. it won't need to enter identifiers into the
stringtable or convert integer literals to integers.
The idea is we wish to encourage extensive unit tests, but not punish users for
having them with slower compile times.
--