Implement #if, #else, #elif, and #endif with tests.
authorCarl Worth <cworth@cworth.org>
Fri, 21 May 2010 05:27:07 +0000 (22:27 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 21 May 2010 05:27:07 +0000 (22:27 -0700)
commitb20d33c5c6fea8e392c26e9ab060efd14034f1f9
tree0285aa21a9c693a155d02a1b1f715137b49f494c
parentd8327e575dd20fe696f3a44ada4bd4001b15db27
Implement #if, #else, #elif, and #endif with tests.

So far the only expression implemented is a single integer literal,
but obviously that's easy to extend. Various things including nesting
are tested here.
13 files changed:
glcpp-lex.l
glcpp-parse.y
glcpp.h
tests/040-token-pasting.c [new file with mode: 0644]
tests/041-if-0.c [new file with mode: 0644]
tests/042-if-1.c [new file with mode: 0644]
tests/043-if-0-else.c [new file with mode: 0644]
tests/044-if-1-else.c [new file with mode: 0644]
tests/045-if-0-elif.c [new file with mode: 0644]
tests/046-if-1-elsif.c [new file with mode: 0644]
tests/047-if-elif-else.c [new file with mode: 0644]
tests/048-if-nested.c [new file with mode: 0644]
tests/glcpp-test