#include now works

git-svn-id: http://picoc.googlecode.com/svn/trunk@182 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-03-10 01:01:57 +00:00
parent 456a83da75
commit 8d76edfe4b
5 changed files with 10 additions and 2 deletions

View file

@ -366,7 +366,7 @@ int ParseStatement(struct ParseState *Parser)
if (LexGetToken(Parser, &LexerValue, TRUE) != TokenStringConstant)
ProgramFail(Parser, "\"filename.h\" expected");
//ScanFile(LexerValue->Val->String); // XXX - need to dereference char * here
PlatformScanFile(LexerValue->Val->Pointer.Segment->Val->Array.Data);
CheckTrailingSemicolon = FALSE;
break;
}

3
tests/18_include.c Normal file
View file

@ -0,0 +1,3 @@
printf("including\n");
#include "18_include.h"
printf("done\n");

3
tests/18_include.expect Normal file
View file

@ -0,0 +1,3 @@
including
included
done

1
tests/18_include.h Normal file
View file

@ -0,0 +1 @@
printf("included\n");

View file

@ -13,7 +13,8 @@ TESTS= 00_assignment.test \
13_integer_literals.test \
14_if.test \
16_nesting.test \
17_enum.test
17_enum.test \
18_include.test
%.test: %.expect %.c
@echo Test: $*...