diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-02-19 05:06:45 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-02-19 05:06:45 +0000 |
commit | 0e9e8dab385375c0cbb83d89a71fbf8d71206b47 (patch) | |
tree | bacb57c4e93652ac8348d7951c63f1796c9f7750 /c_parser/test/in | |
parent | 258c14392606ec4ba0a590cac80ba4198ef920d9 (diff) | |
download | Compiler-0e9e8dab385375c0cbb83d89a71fbf8d71206b47.tar.gz Compiler-0e9e8dab385375c0cbb83d89a71fbf8d71206b47.zip |
Finished if statement for the most part
Diffstat (limited to 'c_parser/test/in')
-rw-r--r-- | c_parser/test/in/07.c | 6 | ||||
-rw-r--r-- | c_parser/test/in/08.c | 10 | ||||
-rw-r--r-- | c_parser/test/in/09.c | 15 |
3 files changed, 29 insertions, 2 deletions
diff --git a/c_parser/test/in/07.c b/c_parser/test/in/07.c index baa3ba5..6abb5b5 100644 --- a/c_parser/test/in/07.c +++ b/c_parser/test/in/07.c @@ -1,3 +1,5 @@ -if(x == y) { - int z; +int foo(int a) { + if(x == y) { + int z; + } } diff --git a/c_parser/test/in/08.c b/c_parser/test/in/08.c new file mode 100644 index 0000000..3d8e983 --- /dev/null +++ b/c_parser/test/in/08.c @@ -0,0 +1,10 @@ +int func(int a, int b) { + int c = 0; + if(a == b) { + int d; + } else if(a == d) { + int e; + return d; + } + return c; +} diff --git a/c_parser/test/in/09.c b/c_parser/test/in/09.c new file mode 100644 index 0000000..08a7ee4 --- /dev/null +++ b/c_parser/test/in/09.c @@ -0,0 +1,15 @@ +int x() +{} + +int g; + +int zz(int a, int b, int c) +{ + if(a==b){ + int a; + return a; + }else{ + int fsdfsdfs; + return c; + } +} |