Compile-Time Memoization of Pegged-Generated Parser
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Nov 26 14:40:27 PST 2014
On Wednesday, 26 November 2014 at 22:31:04 UTC, Nordlöw wrote:
> source/app.d(63): Error: no identifier for declarator fileWrites
> source/app.d(63): Error: Declaration expected, not '~='
> source/app.d(64): Error: no identifier for declarator fileWrites
> source/app.d(64): Error: Declaration expected, not '~='
>
> Have I missed something?
>
> Destroy!
Update: I guess this means D doesn't allow any statements in
global scope. Can/Should I instead use some compile-time
reflection to get list of parser strings that should be cached to
disk? I guess if I wrap the path-parser-string-pair in a struct,
say CachingPeggedParser, defined in global scope I could get a
list of all the enum instances of this struct and do something
with these in module constructor right?
Please tell me if this approach is unneccessary complicated!
More information about the Digitalmars-d-learn
mailing list