p4c
p4c copied to clipboard
Strange `IHasSourceInfo` interface
The definition of IHasSourceInfo interface is quite strange:
class IHasSourceInfo {
public:
virtual SourceInfo getSourceInfo() const = 0;
virtual cstring toString() const = 0;
virtual ~IHasSourceInfo() {}
};
Essentially it demands the presence of toString method in addition to having a SourceInfo Why it is so?