Closed enjoysmath closed 1 year ago
Got it to build the fucking grammar module:
module variable;
import language;
import pegged.grammar;
class Variable : Language
{
package:
static enum grammar = `
Variable:
Var <- "C"
`;
}
static this() {
try {
asModule(__MODULE__ ~ "_grammar", "source/" ~ __MODULE__ ~ "_grammar", Variable.grammar);
}
catch (Exception e)
{
import std.stdio;
writeln(e);
}
}
Following the arithmetic example as in the Wiki. I put:
The wiki says that it will generate grammar/variable.d in the current directory but it doesn't generate jack shit.