mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
cleaner approach for localizing errors associated with duplicated ASTs: virtualize GetLocationInfo
This commit is contained in:
parent
c0a5328f8e
commit
eb1848c547
11 changed files with 37 additions and 33 deletions
|
@ -113,6 +113,14 @@ public:
|
|||
return {AdoptRef{}, succ};
|
||||
}
|
||||
|
||||
const detail::Location* GetLocationInfo() const override
|
||||
{
|
||||
if ( original )
|
||||
return original->GetLocationInfo();
|
||||
else
|
||||
return Obj::GetLocationInfo();
|
||||
}
|
||||
|
||||
protected:
|
||||
explicit Stmt(StmtTag arg_tag);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue