Fix stripping comments when converting from *.ino to *.cpp

This commit is contained in:
Ivan Kravets
2015-05-23 15:00:21 +03:00
parent 28dd32070f
commit 363c65da5f

View File

@ -319,7 +319,8 @@ class InoToCPPConverter(object):
DETECTMAIN_RE = re.compile(r"void\s+(setup|loop)\s*\(", re.M | re.I)
STRIPCOMMENTS_RE = re.compile(r"(/\*.*?\*/|//[^\r\n]*$)", re.M | re.S)
STRIPCOMMENTS_RE = re.compile(r"(/\*.*?\*/|(^|\s+)//[^\r\n]*$)",
re.M | re.S)
def __init__(self, nodes):
self.nodes = nodes