diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-11-14 14:35:52 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-11-15 17:28:08 +0100 |
commit | 4b3654d854a4d8c5fb4c93c612a13de2a6e8eb7c (patch) | |
tree | 46f24ef76d615b09ee2a4a5d3d78fcab61eed63b /vala/valasymbol.vala | |
parent | bddb420a814a4f19dd2ed93d7896557aa73974b1 (diff) | |
download | vala-4b3654d854a4d8c5fb4c93c612a13de2a6e8eb7c.tar.gz |
vala: Add SymbolAccessibility.to_string()
Diffstat (limited to 'vala/valasymbol.vala')
-rw-r--r-- | vala/valasymbol.vala | 12 |
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 { |