public override void CodeGen(StreamWriter stream) { stream.Write(".method "); foreach (var child in modifiers) { if (child == Modifier.Public) { stream.Write("public "); } if (child == Modifier.Static) { stream.Write("static "); } } stream.Write("{0} {1}", type.GetTypeName(), methodname); foreach (var child in parameters) { child.CodeGen(stream); } stream.WriteLine(); stream.WriteLine("{"); stream.WriteLine(".entrypoint"); foreach (var child in statements) { child.CodeGen(stream); } stream.WriteLine("}"); }
public override void CodeGen(StreamWriter stream) { stream.BaseStream.Seek(0, SeekOrigin.End); stream.WriteLine(".locals init ([{0}] {1} {2})", num, type.GetTypeName(), varName); }
public ArrayType(JavaType innerType) { this.innerType = innerType; this.name = innerType.GetTypeName() + "[]"; }
public bool Equal(JavaType other) { return(name.Equals(other.GetTypeName())); }