Add a regular expression for the ///< type comment
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 19 Jan 2009 18:43:49 +0000 (18:43 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 19 Jan 2009 18:43:49 +0000 (18:43 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2186 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index 2e55ffaaad465d216d871e08e5410fea38c3bd90..a50df0f49e0eb5ac49288d6e2dbfcf2fc3dc06f6 100644 (file)
@@ -100,6 +100,7 @@ def getDefinitionBlocks(text):
     for comment, define in block_tmp:
         block.append((" ".join(re.findall(r"^\s*\*?\s*(.*?)\s*?$", comment, re.MULTILINE)), define))
     block += re.findall(r"/{3}<?\s*(.*)\s*#define\s+(.*)\s*?$", text, re.MULTILINE)
+    block += [(comment, define) for define, comment in re.findall(r"#define\s*(.*?)\s*/{3}<\s*(.*?)\s*?$", text, re.MULTILINE)]
     return block
 
 def loadModuleInfos(path):
@@ -109,4 +110,4 @@ def loadModuleInfos(path):
         moduleInfos[moduleName] = []
         for element in getDefinitionBlocks(open(definition[1] + "/" + definition[0], "r").read()):
             moduleInfos[moduleName].append(element)
-    return moduleInfos
\ No newline at end of file
+    return moduleInfos