71 references to Write
CSharpSyntaxGenerator (71)
SourceWriter.cs (56)
169Write($"internal {node.Name}(SyntaxKind kind");
181Write($"internal {node.Name}(SyntaxKind kind");
194Write($"internal {node.Name}(SyntaxKind kind");
238Write("internal override GreenNode? GetSlot(int index)");
283Write($", {(GetFieldType(field, green: true))} {CamelCase(field.Name)}");
288Write($", {field.Type} {CamelCase(field.Name)}");
329Write($" => new {node.Name}(");
330Write(CommaJoin(
342Write($" => new {node.Name}(");
343Write(CommaJoin(
381Write($"public {node.Name} Update(");
382Write(CommaJoin(node.Fields.Select(f =>
396Write("if (");
403Write(" || ");
404Write($"{CamelCase(field.Name)} != this.{field.Name}");
412Write($"var newNode = SyntaxFactory.{StripPost(node.Name, "Syntax")}(");
413Write(CommaJoin(
456Write("=> node.Update(");
457Write(CommaJoin(node.Fields.Select(f =>
516Write($"public {(withSyntaxFactoryContext ? "" : "static ")}{nd.Name} {StripPost(nd.Name, "Syntax")}(");
610Write("var cached = CSharpSyntaxNodeCache.TryGetNode((int)");
614Write("var cached = SyntaxNodeCache.TryGetNode((int)");
624Write($"var result = new {nd.Name}(");
643Write($"return new {nd.Name}(");
653Write(CommaJoin(
670Write(CommaJoin(
859Write($"public {OverrideOrNewModifier(field)}{GetRedPropertyType(field)} {field.Name}");
891Write($"public {OverrideOrNewModifier(field)}{GetRedPropertyType(field)} {field.Name}");
938Write("internal override SyntaxNode? GetNodeSlot(int index)");
984Write("internal override SyntaxNode? GetCachedSlot(int index)");
1081Write($"public {node.Name} Update(");
1082Write(CommaJoin(
1087Write("if (");
1094Write(" || ");
1095Write($"{CamelCase(field.Name)} != this.{field.Name}");
1103Write($"var newNode = SyntaxFactory.{StripPost(node.Name, "Syntax")}(");
1104Write(CommaJoin(
1135Write($"internal override {baseType.Name} With{field.Name}Core({GetRedPropertyType(baseField)} {CamelCase(field.Name)}) => With{field.Name}({CamelCase(field.Name)}");
1138Write($" ?? throw new ArgumentNullException(nameof({CamelCase(field.Name)}))");
1146Write(
1151Write(CommaJoin(node.Fields.Select(f =>
1266Write($"public{(isNew ? " new " : " ")}{node.Name} Add{StripPost(field.Name, "Opt")}{referencedNodeField.Name}(params {argType}[] items)");
1306Write(" => node.Update(");
1307Write(CommaJoin(node.Fields.Select(f =>
1424Write($"public static {nd.Name} {StripPost(nd.Name, "Syntax")}(");
1483Write($"return ({nd.Name})Syntax.InternalSyntax.SyntaxFactory.{StripPost(nd.Name, "Syntax")}(");
1484Write(CommaJoin(
1518Write(CommaJoin(
1609Write($"public static {nd.Name} {StripPost(nd.Name, "Syntax")}(");
1610Write(CommaJoin(
1616Write($" => SyntaxFactory.{StripPost(nd.Name, "Syntax")}(");
1617Write(CommaJoin(
1698Write($"public static {nd.Name} {StripPost(nd.Name, "Syntax")}(");
1699Write(CommaJoin(
1722Write($" => SyntaxFactory.{StripPost(nd.Name, "Syntax")}(");
1724Write(CommaJoin(