summaryrefslogtreecommitdiff
path: root/vala/valasymbol.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-11-14 14:35:52 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2018-11-15 17:28:08 +0100
commit4b3654d854a4d8c5fb4c93c612a13de2a6e8eb7c (patch)
tree46f24ef76d615b09ee2a4a5d3d78fcab61eed63b /vala/valasymbol.vala
parentbddb420a814a4f19dd2ed93d7896557aa73974b1 (diff)
downloadvala-4b3654d854a4d8c5fb4c93c612a13de2a6e8eb7c.tar.gz
vala: Add SymbolAccessibility.to_string()
Diffstat (limited to 'vala/valasymbol.vala')
-rw-r--r--vala/valasymbol.vala12
1 files changed, 11 insertions, 1 deletions
diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala
index 59e75a577..3801c83c8 100644
--- a/vala/valasymbol.vala
+++ b/vala/valasymbol.vala
@@ -482,7 +482,17 @@ public enum Vala.SymbolAccessibility {
PRIVATE,
INTERNAL,
PROTECTED,
- PUBLIC
+ PUBLIC;
+
+ public unowned string to_string () {
+ switch (this) {
+ case PROTECTED: return "protected";
+ case INTERNAL: return "internal";
+ case PRIVATE: return "private";
+ case PUBLIC: return "public";
+ default: assert_not_reached ();
+ }
+ }
}
public enum Vala.MemberBinding {