Add function that retrieves first FunctionDefinition up the scope path

This commit is contained in:
Leonardo Alt
2019-05-09 09:15:11 +02:00
parent 8f2c8daf22
commit dcd6cb94bf
3 changed files with 19 additions and 0 deletions
+3
View File
@@ -161,6 +161,9 @@ public:
/// @returns the source unit this scopable is present in.
SourceUnit const& sourceUnit() const;
/// @returns the function or modifier definition this scopable is present in or nullptr.
CallableDeclaration const* functionOrModifierDefinition() const;
/// @returns the source name this scopable is present in.
/// Can be combined with annotation().canonicalName (if present) to form a globally unique name.
std::string sourceUnitName() const;