ast: Visibility: Add `has_path` method

This commit is contained in:
Arthur Cohen 2022-04-25 16:45:44 +02:00
parent 5536d36307
commit d0c75495dd
1 changed files with 3 additions and 0 deletions

View File

@ -640,6 +640,9 @@ public:
return vis_type == PUB_IN_PATH && in_path.is_empty ();
}
// Returns whether a visibility has a path
bool has_path () const { return !(is_error ()) && vis_type == PUB_IN_PATH; }
// Returns whether visibility is public or not.
bool is_public () const { return vis_type != PRIV && !is_error (); }