public override void EmitContainerJs(JsEmitContext jec) { if (OptAttributes != null) { OptAttributes.EmitJs(jec); } foreach (var tc in containers) { tc.PrepareEmit(); } base.EmitContainerJs(jec); if (Compiler.Report.Errors == 0 && !Compiler.Settings.WriteMetadataOnly) { VerifyMembers(); } if (anonymous_types != null) { foreach (var atypes in anonymous_types) { foreach (var at in atypes.Value) { at.EmitContainerJs(jec); } } } }
/// <summary> /// Base JS emit method. This is also entry point for CLS-Compliant verification. /// </summary> public virtual void EmitJs(JsEmitContext jec) { if (!Compiler.Settings.VerifyClsCompliance) return; VerifyClsCompliance (); }
public override void EmitStatementJs(JsEmitContext jec) { jec.Buf.Write("\t", Location); Target.EmitJs(jec); jec.Buf.Write(" = "); Source.EmitJs(jec); jec.Buf.Write(";\n"); }
public virtual void EmitJs() { jec = new JsEmitContext(module); jec.Buf.Write("// Module: ", this.Name, ".js\n"); module.EmitContainerJs(jec); }
public virtual void EmitJs(JsEmitContext jec) { bool first = true; foreach (Argument a in args) { if (!first) { jec.Buf.Write(", "); } a.Expr.EmitJs(jec); first = false; } }
public override void EmitJs(JsEmitContext jec) { jec.Buf.Write("[", Location); bool first = true; foreach (var elem in Elements) { if (!first) { jec.Buf.Write(", "); } elem.EmitJs(jec); first = false; } jec.Buf.Write("]"); }
public override void EmitJs(JsEmitContext jec) { jec.Buf.Write("{", Location); bool first = true; foreach (ElementInitializer elem in Elements) { if (!first) { jec.Buf.Write(", "); } jec.Buf.Write("\"", elem.Name, "\":"); elem.Source.EmitJs(jec); first = false; } jec.Buf.Write("}"); }
public override void EmitJs(JsEmitContext jec) { jec.Buf.Write(GetValue() as String, Location); }
public override void EmitJs(JsEmitContext jec) { jec.Buf.Write("new ", Location); Expr.EmitJs(jec); }
public override void EmitJs(JsEmitContext jec) { DoEmitJs(jec); }
protected override void DoEmitJs(JsEmitContext jec) { expr.EmitJs(jec); }
public override void EmitJs(JsEmitContext jec) { jec.Buf.Write("undefined", Location); }
public override void EmitJs(JsEmitContext jec) { Expr.EmitJs(jec); jec.Buf.Write(" in "); ObjectExpression.EmitJs(jec); }
public override void EmitJs(JsEmitContext jec) { Arguments[0].Expr.EmitJs(jec); jec.Buf.Write(".", name, Location); }
public override void EmitJs(JsEmitContext jec) { child.EmitJs(jec); }
public override void EmitJs(JsEmitContext jec) { Target.EmitJs(jec); jec.Buf.Write(" = "); Source.EmitJs(jec); }
public override void EmitJs(JsEmitContext jec) { jec.Buf.Write("\"", jec.Buf.EscapeString(Value), "\"", loc); }