X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fobjcsourcefile.cpp;fp=source%2Fobjcsourcefile.cpp;h=ed334fc17e92b63c4e63f6ddff77911678845d10;hb=7bcd4fef81679dedcabc5a58b12511a6b52c4fe4;hp=0000000000000000000000000000000000000000;hpb=6e02286dcbd62b8f5ef56987c2298d54b689ad9c;p=builder.git diff --git a/source/objcsourcefile.cpp b/source/objcsourcefile.cpp new file mode 100644 index 0000000..ed334fc --- /dev/null +++ b/source/objcsourcefile.cpp @@ -0,0 +1,23 @@ +#include +#include "objcsourcefile.h" + +using namespace std; +using namespace Msp; + +ObjCSourceFile::ObjCSourceFile(Builder &b, const FS::Path &p): + CSourceFile(b, p) +{ } + +ObjCSourceFile::ObjCSourceFile(Builder &b, const Component &c, const FS::Path &p): + CSourceFile(b, c, p) +{ } + +void ObjCSourceFile::parse_includes(IO::Base &in) +{ + static Regex r_include("^[ \t]*#(include|import)[ \t]+([\"<].*)[\">]"); + + string line; + while(in.getline(line)) + if(RegMatch match = r_include.match(line)) + includes.push_back(match[2].str); +}