Comment #1 by alienballance — 2013-07-17T17:12:05Z
That's the error:
src/main.d(43): Error: semicolon expected, not 'EOF'
src/main.d(48): Error: undefined identifier _s0, did you mean variable _s?
src/main.d(48): Error: undefined identifier _s1, did you mean variable _s?
src/main.d(57): Error: template instance nawia.main.State!(StateRunning, StateDisposer) error instantiating
Comment #2 by k.hara.pg — 2013-07-17T18:24:41Z
(In reply to comment #0)
[snip]
Problem is in Declaration template.
>
> template Declaration(uint idx, T)
> {
> enum Declaration =
> "const("~T.stringof~")* _s"~idx~";"; // here
> //text("const(",T.stringof,")* _s",idx,";");
> }
It concatenates string ~ uint ~ string.
When uint idx is 0, Declaration!(0, T) generates
"const(StateRunning)* _s\0;"
There's null character.
Then, in mixin statement, dmd lexer extract null character as EOF token, and reports "semicolon expected, not 'EOF'" error.