84 references to CamelCase
CSharpSyntaxGenerator (84)
SourceWriter.cs (84)
159WriteLine($"internal readonly {type} {CamelCase(field.Name)};");
164WriteLine($"internal readonly {field.Type} {CamelCase(field.Name)};");
212WriteLine($"public {OverrideOrNewModifier(field)}{type} {field.Name} => new {type}(this.{CamelCase(field.Name)});");
217WriteLine($"public {OverrideOrNewModifier(field)}{type} {field.Name} => new {type}(new CoreSyntax.SyntaxList<CSharpSyntaxNode>(this.{CamelCase(field.Name)}));");
222WriteLine($"public {OverrideOrNewModifier(field)}{type} {field.Name} => new {type}(this.{CamelCase(field.Name)});");
226WriteLine($"public {OverrideOrNewModifier(field)}{(GetFieldType(field, green: true))} {field.Name} => this.{CamelCase(field.Name)};");
233WriteLine($"public {OverrideOrNewModifier(field)}{field.Type} {field.Name} => this.{CamelCase(field.Name)};");
248WriteLine($"=> index == 0 ? this.{CamelCase(nodeFields[0].Name)} : null;");
260WriteLine($"{i} => this.{CamelCase(field.Name)},");
283Write($", {(GetFieldType(field, green: true))} {CamelCase(field.Name)}");
288Write($", {field.Type} {CamelCase(field.Name)}");
306WriteLine($"if ({CamelCase(field.Name)} != null)");
308WriteLine($"this.AdjustFlagsAndWidth({CamelCase(field.Name)});");
309WriteLine($"this.{CamelCase(field.Name)} = {CamelCase(field.Name)};");
314WriteLine($"this.AdjustFlagsAndWidth({CamelCase(field.Name)});");
315WriteLine($"this.{CamelCase(field.Name)} = {CamelCase(field.Name)};");
321WriteLine($"this.{CamelCase(field.Name)} = {CamelCase(field.Name)};");
332node.Fields.Select(f => $"this.{CamelCase(f.Name)}"),
345node.Fields.Select(f => $"this.{CamelCase(f.Name)}"),
391return $"{type} {CamelCase(f.Name)}";
404Write($"{CamelCase(field.Name)} != this.{field.Name}");
415node.Fields.Select(f => CamelCase(f.Name))));
539var pname = CamelCase(field.Name);
543WriteLine($"if ({CamelCase(field.Name)} == null) throw new ArgumentNullException(nameof({CamelCase(field.Name)}));");
549WriteLine($"if ({CamelCase(field.Name)} != null)");
664return $"{type} {CamelCase(f.Name)}";
674? $"{CamelCase(f.Name)}.Node"
675: CamelCase(f.Name)),
677valueFields.Select(f => CamelCase(f.Name)),
724WriteLine($"public {node.Name} With{field.Name}({fieldType} {CamelCase(field.Name)}) => With{field.Name}Core({CamelCase(field.Name)});");
725WriteLine($"internal abstract {node.Name} With{field.Name}Core({fieldType} {CamelCase(field.Name)});");
773WriteLine($"public new {node.Name} With{baseField.Name}({GetRedFieldType(baseField)} {CamelCase(baseField.Name)}) => ({node.Name})With{baseField.Name}Core({CamelCase(baseField.Name)});");
834WriteLine($"private SyntaxNode? {CamelCase(field.Name)};");
839WriteLine($"private {type} {CamelCase(field.Name)};");
866WriteLine($"var slot = ((Syntax.InternalSyntax.{node.Name})this.Green).{CamelCase(field.Name)};");
873WriteLine($" => new SyntaxToken(this, ((InternalSyntax.{node.Name})this.Green).{CamelCase(field.Name)}, {GetChildPosition(i)}, {GetChildIndex(i)});");
895WriteLine($" => new {field.Type}(GetRed(ref this.{CamelCase(field.Name)}, {i}));");
904WriteLine($"var red = GetRed(ref this.{CamelCase(field.Name)}, {i});");
918WriteLine($" => GetRedAtZero(ref this.{CamelCase(field.Name)}){suffix};");
922WriteLine($" => GetRed(ref this.{CamelCase(field.Name)}, {i}){suffix};");
950? $"GetRedAtZero(ref this.{CamelCase(field.Name)})"
951: $"GetRed(ref this.{CamelCase(field.Name)}, {index})";
967WriteLine($"{index} => GetRedAtZero(ref this.{CamelCase(field.Name)}){suffix},");
971WriteLine($"{index} => GetRed(ref this.{CamelCase(field.Name)}, {index}){suffix},");
995WriteLine($" => index == {index} ? this.{CamelCase(field.Name)} : null;");
1005WriteLine($"{index} => this.{CamelCase(field.Name)},");
1083node.Fields.Select(f => $"{GetRedPropertyType(f)} {CamelCase(f.Name)}")));
1095Write($"{CamelCase(field.Name)} != this.{field.Name}");
1106node.Fields.Select(f => CamelCase(f.Name))));
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)}))");
1147$"public{(isNew ? " new " : " ")}{node.Name} With{StripPost(field.Name, "Opt")}({type} {CamelCase(field.Name)})" +
1152f == field ? CamelCase(f.Name) : $"this.{f.Name}")));
1273var varName = StripPost(CamelCase(field.Name), "Opt");
1318return $"({(GetFieldType(f, green: false))})Visit(node.{f.Name}) ?? throw new ArgumentNullException(\"{CamelCase(f.Name)}\")";
1447var pname = CamelCase(field.Name);
1479WriteLine($"if ({CamelCase(field.Name)} == null) throw new ArgumentNullException(nameof({CamelCase(field.Name)}));");
1491return $"(Syntax.InternalSyntax.SyntaxToken?){CamelCase(f.Name)}.Node";
1494return $"(Syntax.InternalSyntax.SyntaxToken){CamelCase(f.Name)}.Node!";
1497return $"{CamelCase(f.Name)}.Node.ToGreenList<Syntax.InternalSyntax.SyntaxToken>()";
1499return $"{CamelCase(f.Name)}.Node.ToGreenList<Syntax.InternalSyntax.{GetElementType(f.Type)}>()";
1501return $"{CamelCase(f.Name)}.Node.ToGreenSeparatedList<Syntax.InternalSyntax.{GetElementType(f.Type)}>()";
1503return $"{CamelCase(f.Name)}.Node.ToGreenList<Syntax.InternalSyntax.CSharpSyntaxNode>()";
1505return $"{CamelCase(f.Name)} == null ? null : (Syntax.InternalSyntax.{f.Type}){CamelCase(f.Name)}.Green";
1507return $"(Syntax.InternalSyntax.{f.Type}){CamelCase(f.Name)}.Green";
1510valueFields.Select(f => CamelCase(f.Name))));
1520nd.Fields.Select(f => $"{this.GetRedPropertyType(f)} {CamelCase(f.Name)}")));
1613f => $"{GetRedPropertyType(f)} {CamelCase(f.Name)}")));
1620? CamelCase(f.Name)
1710return $"{type} {CamelCase(f.Name)}";
1717return $"{type} {CamelCase(f.Name)} = default";
1733return $"{GetStringConverterMethod(f)}({CamelCase(f.Name)})";
1735return CamelCase(f.Name);
1740return CamelCase(f.Name);
1742return $"{CamelCase(f.Name)} ?? {GetDefaultValue(nd, f)}";