IOperationClassWriter.cs (17)
34_typeMap = _tree.Types.OfType<AbstractNode>().ToDictionary(t => t.Name, t => (AbstractNode?)t);
205WriteLine($"{(node.IsInternal ? "internal" : "public")} interface {node.Name} : {node.Base}");
228return new[] { GetSubName(node.Name) };
345node.Name,
355writeEnumElement(GetSubName(currentEntry.Name),
357currentEntry.Name,
405string typeName = type.Name[1..];
423writeClassHeader(type.IsAbstract ? "abstract" : "sealed", @class, @base, type.Name);
649throw new InvalidOperationException($"{node.Name} is not being included in OperationKind, but has no base type!");
657return GetSubName(node.Name);
710Debug.Assert(node.ChildrenOrder != null, $"Encountered null children order for {type.Name}, should have been caught in verifier!");
951string nameMinusI = node.Name[1..];
952WriteLine($"{(node.IsInternal ? "internal" : "public")} override IOperation {GetVisitorName(node)}({node.Name} operation, object? argument)");
1030var baseName = GetSubName(type.Name);
1031WriteLine($"{accessibility} virtual void {GetVisitorName(type)}({type.Name} operation) => DefaultVisit(operation);");
1050WriteLine($"{accessibility} virtual TResult? {GetVisitorName(type)}({type.Name} operation, TArgument argument) => DefaultVisit(operation, argument);");
1067return type.VisitorName ?? $"Visit{GetSubName(type.Name)}";