]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Adding another test qc file, for constant folding
authorWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 21:53:55 +0000 (23:53 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 21:53:55 +0000 (23:53 +0200)
data/numbers.qc [new file with mode: 0644]

diff --git a/data/numbers.qc b/data/numbers.qc
new file mode 100644 (file)
index 0000000..6fac97a
--- /dev/null
@@ -0,0 +1,22 @@
+/* this is the WIP test for the parser...
+ * constantly adding stuff here to see if things break
+ */
+void(string)        print  = #1;
+void(string,string) print2 = #1;
+void(string,string,string) print3 = #1;
+string(float)       ftos   = #2;
+
+void() main = {
+    float a, b, c;
+    a = 3 + 4 + 5;
+    b = (5 * 2) + 1;
+    c = 3 & 1;
+    c = 1 | 2;
+    a = 3 && 4;
+    b = 0 && 4;
+    c = 4 && 0;
+    a = 1 || 1;
+    b = 1 || 0;
+    c = 0 || 1;
+    a = 0 || 0;
+};