[gnoduino] preproc: allow whitespace before #include



commit 6426dc657e3fdfa49ac6c3e8ebe7a89638ec0ded
Author: Pascal de Bruijn <pmjdebruijn pcode nl>
Date:   Sun May 5 13:48:34 2013 +0200

    preproc: allow whitespace before #include

 src/preproc.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/preproc.py b/src/preproc.py
index 696fc4a..674ef54 100644
--- a/src/preproc.py
+++ b/src/preproc.py
@@ -72,7 +72,7 @@ def genPrototype(instr):
 
 def findIncludes(instr, local=False):
        res = ""
-       m = re.findall(r"^#include\s+[\w+\".<>\-]+", instr, re.M)
+       m = re.findall(r"^\s*#include\s+[\w+\".<>\-]+", instr, re.M)
        l = [z.split()[1].strip('<>"') for z in m]
        my = []
        for z in l:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]