IOperationClassWriter.cs (17)
34_typeMap = _tree.Types.OfType<AbstractNode>().ToDictionary(t => t.Name, t => (AbstractNode?)t);
209WriteLine($"{(node.IsInternal ? "internal" : "public")} interface {node.Name} : {node.Base}");
232return new[] { GetSubName(node.Name) };
349node.Name,
359writeEnumElement(GetSubName(currentEntry.Name),
361currentEntry.Name,
409string typeName = type.Name[1..];
427writeClassHeader(type.IsAbstract ? "abstract" : "sealed", @class, @base, type.Name);
653throw new InvalidOperationException($"{node.Name} is not being included in OperationKind, but has no base type!");
661return GetSubName(node.Name);
714Debug.Assert(node.ChildrenOrder != null, $"Encountered null children order for {type.Name}, should have been caught in verifier!");
955string nameMinusI = node.Name[1..];
956WriteLine($"{(node.IsInternal ? "internal" : "public")} override IOperation {GetVisitorName(node)}({node.Name} operation, object? argument)");
1034var baseName = GetSubName(type.Name);
1035WriteLine($"{accessibility} virtual void {GetVisitorName(type)}({type.Name} operation) => DefaultVisit(operation);");
1054WriteLine($"{accessibility} virtual TResult? {GetVisitorName(type)}({type.Name} operation, TArgument argument) => DefaultVisit(operation, argument);");
1071return type.VisitorName ?? $"Visit{GetSubName(type.Name)}";