summaryrefslogtreecommitdiff
path: root/source/slang/syntax.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/syntax.h')
-rw-r--r--source/slang/syntax.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h
index 4329f6cbd..1704c1224 100644
--- a/source/slang/syntax.h
+++ b/source/slang/syntax.h
@@ -671,6 +671,11 @@ namespace Slang
bool isValid() const { return item.declRef.getDecl() != nullptr; }
bool isOverloaded() const { return items.Count() > 1; }
+
+ String const& getName() const
+ {
+ return items.Count() > 1 ? items[0].declRef.GetName() : item.declRef.GetName();
+ }
};
struct SemanticsVisitor;