BoundNodeClassWriter.cs (59)
117Write(format, args);
346Write("(");
351Write(")");
422Write("{0} {1}", isPublic ? "public" : "protected", node.Name);
436Write(": base(");
440Write(string.Format("BoundKind.{0}", StripBound(node.Name)));
441Write(", syntax, ");
443Write("{0}, ", FieldNullHandling(node, baseField.Name) == NullHandling.Always ? "null" : ToCamelCase(baseField.Name));
451Write("kind, syntax, ");
453Write("{0}, ", FieldNullHandling(node, baseField.Name) == NullHandling.Always ? "null" : ToCamelCase(baseField.Name));
454Write("hasErrors");
456Write(")");
491Write("{0} {1}", isPublic ? "Public" : "Protected", "Sub New");
504Write("MyBase.New(");
508Write(string.Format("BoundKind.{0}", StripBound(node.Name)));
509Write(", syntax, ");
511Write("{0}, ", FieldNullHandling(node, baseField.Name) == NullHandling.Always ? "Nothing" : ToCamelCase(baseField.Name));
519Write("kind, syntax, ");
521Write("{0}, ", FieldNullHandling(node, baseField.Name) == NullHandling.Always ? "Nothing" : ToCamelCase(baseField.Name));
522Write("hasErrors");
524Write(")");
568Write("{0} {1}", isPublic ? "public" : "protected", node.Name);
576Write(": base(");
580Write(string.Format("BoundKind.{0}", StripBound(node.Name)));
581Write(", syntax");
583Write(", {0}", FieldNullHandling(node, baseField.Name) == NullHandling.Always ? "null" : ToCamelCase(baseField.Name));
588Write("kind, syntax");
590Write(", {0}", FieldNullHandling(node, baseField.Name) == NullHandling.Always ? "null" : ToCamelCase(baseField.Name));
592Write(")");
611Write("{0} {1}", isPublic ? "Public" : "Protected", "Sub New");
618Write("MyBase.New(");
622Write(string.Format("BoundKind.{0}", StripBound(node.Name)));
623Write(", syntax");
625Write(", {0}", FieldNullHandling(node, baseField.Name) == NullHandling.Always ? "Nothing" : ToCamelCase(baseField.Name));
630Write("kind, syntax");
632Write(", {0}", FieldNullHandling(node, baseField.Name) == NullHandling.Always ? "Nothing" : ToCamelCase(baseField.Name));
634Write(")");
951Write("public{1} {0} Update", node.Name, emitNew ? " new" : "");
959Write("if ");
965Write("var result = new {0}", node.Name);
1000Write("Public{0} Function Update", emitNew ? " Shadows" : "");
1009Write("If ");
1013Write("Dim result = New {0}", node.Name);
1241Write("public override TreeDumperNode Visit{0}({1} node, object? arg) => new TreeDumperNode(\"{2}\", null, ", StripBound(node.Name), node.Name, ToCamelCase(StripBound(node.Name)));
1251Write("new TreeDumperNode(\"{0}\", null, new TreeDumperNode[] {{ Visit(node.{1}, null) }})", ToCamelCase(field.Name), field.Name);
1256Write("new TreeDumperNode(\"{0}\", null, from x in node.{1} select Visit(x, null))", ToCamelCase(field.Name), field.Name);
1260Write("new TreeDumperNode(\"{0}\", null, node.{1}.IsDefault ? Array.Empty<TreeDumperNode>() : from x in node.{1} select Visit(x, null))", ToCamelCase(field.Name), field.Name);
1264Write("new TreeDumperNode(\"{0}\", node.{1}, null)", ToCamelCase(field.Name), field.Name);
1277Write("new TreeDumperNode(\"isSuppressed\", node.IsSuppressed, null)");
1281Write("new TreeDumperNode(\"hasErrors\", node.HasErrors, null)");
1314Write("Return New TreeDumperNode(\"{0}\", Nothing, ", ToCamelCase(StripBound(node.Name)));
1324Write("New TreeDumperNode(\"{0}\", Nothing, new TreeDumperNode() {{Visit(node.{1}, Nothing)}})", ToCamelCase(field.Name), field.Name);
1326Write("New TreeDumperNode(\"{0}\", Nothing, From x In node.{1} Select Visit(x, Nothing))", ToCamelCase(field.Name), field.Name);
1328Write("New TreeDumperNode(\"{0}\", node.{1}, Nothing)", ToCamelCase(field.Name), field.Name);
1386Write("return node.Update");
1428Write("Return node.Update");
1548Write("return ");
1560Write($"{(decl ? $"{node.Name} " : "")}updatedNode = ");
1567Write("node.Update");