示例#1
0
        public void Assemble(string src, string outf)
        {
            var ast = Parser.Parse(src);
            var bcw = new ByteCodeWriter();

            AssembleAst(ast, ref bcw);
            bcw.WriteFile(outf);
        }
示例#2
0
 public static void AssembleAst(List <iAst> src, ref ByteCodeWriter bcw)
 {
     foreach (var i in src)
     {
         foreach (var g in AssemblerIndex)
         {
             if (g.IsMe(i))
             {
                 g.Assemble(i, ref bcw);
                 break;
             }
         }
     }
 }
示例#3
0
 public abstract void Assemble(iAst src, ref ByteCodeWriter bcw);