]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - tests/enum.qc
Implemented concept of enumeration attributes (can be further extended, but currently...
[xonotic/gmqcc.git] / tests / enum.qc
index da08ceee128aa2a0da962a5f9c1f852ed89b51a5..1691661e62d8d627f14e704524f5888668a98fae 100644 (file)
@@ -27,6 +27,12 @@ enum {
     N
 };
 
+enum : flag {
+    F1, /* = 1 << 1 */
+    F2, /* = 1 << 2 */
+    F3  /* = 1 << 3 */
+};
+
 void main() {
     print(ftos(A), "\n");
     print(ftos(B), "\n");
@@ -42,4 +48,8 @@ void main() {
     print(ftos(L), "\n");
     print(ftos(M), "\n");
     print(ftos(N), "\n");
+
+    print(ftos(F1), "\n");
+    print(ftos(F2), "\n");
+    print(ftos(F3), "\n");
 };