Don't require a space between #include and < or ".

The space isn't required by the compiler, but the preprocessor needed
one in order to use the #include to figure out which libraries the
sketch used.  That caused an error if you didn't have the space,
because the corresponding library wasn't linked.

http://code.google.com/p/arduino/issues/detail?id=975
This commit is contained in:
David A. Mellis 2012-07-14 21:42:59 -04:00
parent d903d81d60
commit e945d091c5
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ public class PdePreprocessor {
}
//String importRegexp = "(?:^|\\s|;)(import\\s+)(\\S+)(\\s*;)";
String importRegexp = "^\\s*#include\\s+[<\"](\\S+)[\">]";
String importRegexp = "^\\s*#include\\s*[<\"](\\S+)[\">]";
programImports = new ArrayList<String>();
String[][] pieces = PApplet.matchAll(program, importRegexp);