パーサーのバグ修正,Comiplerを定義
This commit is contained in:
25
SMILEBASIC/compiler.d
Normal file
25
SMILEBASIC/compiler.d
Normal file
@@ -0,0 +1,25 @@
|
||||
module otya.smilebasic.compiler;
|
||||
import otya.smilebasic.node;
|
||||
import otya.smilebasic.vm;
|
||||
import std.stdio;
|
||||
class Compiler
|
||||
{
|
||||
Statements statements;
|
||||
this(Statements statements)
|
||||
{
|
||||
this.statements = statements;
|
||||
}
|
||||
|
||||
void compile()
|
||||
{
|
||||
Code[] code = new Code[0];
|
||||
foreach(Statement i ; statements.statements)
|
||||
{
|
||||
switch(i.type)
|
||||
{
|
||||
default:
|
||||
stderr.writeln("Compile:NotImpl ", i.type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user