Ejemplo n.º 1
0
 public override JsonIr ToJSON()
 {
     return(new JsonIr(GetType())
            .AppendChild(JsonIr.ListToJSON(body))
            .AppendChild(JsonIr.ListToJSON(handlers))
            .AppendChild(JsonIr.ListToJSON(else_part)));
 }
Ejemplo n.º 2
0
 public override JsonIr ToJSON()
 {
     return(new JsonIr(GetType())
            //.AppendChild(JsonIr.ListToJSON(uses))
            .AppendChild(JsonIr.ListToJSON(units_and_standalones))
            .AppendChild(ToJSON(anonymous)));
 }
Ejemplo n.º 3
0
 public override JsonIr ToJSON()
 {
     return(new JsonIr(GetType(), prefix.ToString())
            .AppendChild(ToJSON(loop_counter))
            .AppendChild(ToJSON(while_clause))
            .AppendChild(JsonIr.ListToJSON(invariants))
            .AppendChild(ToJSON(body))
            .AppendChild(JsonIr.ListToJSON(variants)));
 }
Ejemplo n.º 4
0
 public override JsonIr ToJSON()
 {
     return(base.ToJSON()
            //.AppendChild(ToJSON(alias))
            //.AppendChild(new JsonIr("PURE_SAFE_SPEC", isPure ? "pure" : isSafe ? "safe" : null))
            //.AppendChild(new JsonIr("ABSTRACT_SPEC", isAbstract ? "abstract" : null))
            .AppendChild(isForeign ? new JsonIr("FOREIGN_SPEC") : null)
            //.AppendChild(new JsonIr("OVERRIDE_SPEC", isOverride ? "override" : null))
            //.AppendChild(JsonIr.ListToJSON(genericParameters))
            .AppendChild(JsonIr.ListToJSON(parameters))
            .AppendChild(ToJSON(type))
            .AppendChild(
                new JsonIr("PRECONDITION", requireElse ? "require else" : null)
                .AppendChild(JsonIr.ListToJSON(preconditions))
                )
            .AppendChild(ToJSON(routineBody))
            .AppendChild(
                new JsonIr("POSTCONDITION", ensureThen ? "ensure then" : null)
                .AppendChild(JsonIr.ListToJSON(postconditions))
                ));
 }
Ejemplo n.º 5
0
 public override JsonIr ToJSON()
 {
     return(new JsonIr(GetType())
            .AppendChild(JsonIr.ListToJSON(types)));
 }
Ejemplo n.º 6
0
 public override JsonIr ToJSON()
 {
     return(base.ToJSON()
            .AppendChild(JsonIr.ListToJSON(expressions)));
 }
Ejemplo n.º 7
0
 public override JsonIr ToJSON()
 {
     return(base.ToJSON()
            .AppendChild(JsonIr.ListToJSON(ifThenParts))
            .AppendChild(ToJSON(elsePart)));
 }
Ejemplo n.º 8
0
 public override JsonIr ToJSON()
 {
     return(base.ToJSON()
            .AppendChild(ToJSON(secondary))
            .AppendChild(JsonIr.ListToJSON(actuals)));
 }
Ejemplo n.º 9
0
 public override JsonIr ToJSON()
 {
     return(new JsonIr(GetType())  // do not use base.ToJSON(), no need
            .AppendChild(JsonIr.ListToJSON(constants)));
 }