aboutsummaryrefslogtreecommitdiffstats
path: root/c_parser/test/in
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-02-19 14:40:15 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-02-19 14:40:15 +0000
commit563fc043d2ed88cc72b825e3916287f8a67545c2 (patch)
tree66b9dc80272558a25906255bea46641da10fa4b8 /c_parser/test/in
parent1802437f63e14c1128918c4e3a00f60fb97182d9 (diff)
downloadCompiler-563fc043d2ed88cc72b825e3916287f8a67545c2.tar.gz
Compiler-563fc043d2ed88cc72b825e3916287f8a67545c2.zip
Finished declarations completetly apart from curlies
Diffstat (limited to 'c_parser/test/in')
-rw-r--r--c_parser/test/in/10.c18
-rw-r--r--c_parser/test/in/11.c10
-rw-r--r--c_parser/test/in/12.c4
3 files changed, 32 insertions, 0 deletions
diff --git a/c_parser/test/in/10.c b/c_parser/test/in/10.c
new file mode 100644
index 0000000..3d4bb3c
--- /dev/null
+++ b/c_parser/test/in/10.c
@@ -0,0 +1,18 @@
+int f()
+{}
+
+int g = 2;
+
+int x(int y) {
+ int z = 3;
+
+ if(y < z || g < z) {
+ int r;
+ ++y;
+ } else if(y == z) {
+ int f;
+ --y;
+ } else return y;
+
+ return g;
+}
diff --git a/c_parser/test/in/11.c b/c_parser/test/in/11.c
new file mode 100644
index 0000000..7b6c0b5
--- /dev/null
+++ b/c_parser/test/in/11.c
@@ -0,0 +1,10 @@
+int f() {
+ int x = 0;
+
+ while(x < 5) {
+ int y = 0;
+ x++;
+ }
+
+ return x;
+}
diff --git a/c_parser/test/in/12.c b/c_parser/test/in/12.c
new file mode 100644
index 0000000..bc51045
--- /dev/null
+++ b/c_parser/test/in/12.c
@@ -0,0 +1,4 @@
+int f(int b, int c) {
+ int a = b+c;
+ return a;
+}