Permalink
Browse files

• support D, patch from Brian (unbrand at unbounded org)

git-svn-id: http://svn.textmate.org/trunk/Bundles/SCons.tmbundle@4535 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent 6f0f4b3 commit 1fe717e597de2255044e5f2ca8d10516fa1092db @sorbits sorbits committed Aug 1, 2006
Showing with 23 additions and 3 deletions.
  1. +1 −1 Commands/Build ....plist
  2. +1 −1 Commands/Rebuild.plist
  3. +21 −1 Support/bin/scons_gcc_filter.py
View
@@ -40,7 +40,7 @@ python -u "${TM_BUNDLE_SUPPORT}/bin/scons_html_wrapper.py" ${target}</string>
<key>output</key>
<string>showAsHTML</string>
<key>scope</key>
- <string>source.c, source.objc, source.c++, source.objc++, source.python</string>
+ <string>source.c, source.objc, source.c++, source.objc++, source.python, source.d</string>
<key>uuid</key>
<string>88F36C61-F809-4FCE-97AF-D36019891F31</string>
</dict>
View
@@ -31,7 +31,7 @@ python -u "${TM_BUNDLE_SUPPORT}/bin/scons_html_wrapper.py" ${lastTarget}</string
<key>output</key>
<string>showAsHTML</string>
<key>scope</key>
- <string>source.c, source.objc, source.c++, source.objc++, source.python</string>
+ <string>source.c, source.objc, source.c++, source.objc++, source.python, source.d</string>
<key>uuid</key>
<string>2CDB078C-78E9-4DDA-9DF9-6F18D1E92BAE</string>
</dict>
@@ -77,6 +77,19 @@ def filter(self, consumeAll=False):
currdir = self._currdir
content = self._content
+
+ # b bdc we need to look through the content for a "dmd ". if we find one, use the D based search mechanism
+ Dlang = re.compile(r"dmd ")
+ if Dlang.search(content):
+ self._errExpr = re.compile(
+ r"^(?P<preamble>"
+ r"(?P<pathname>[/A-Za-z0-9_.+]*):"
+ r"(?P<line_num>\d+):\s*"
+ r")"
+ r"(?P<error_msg>.*(\n .*)*)",
+ re.MULTILINE)
+ # e bdc
+
search = self._errExpr.search
while True:
match = search(content)
@@ -97,7 +110,14 @@ def filter(self, consumeAll=False):
else:
resultList.append(content[:match.start()])
pathname = match.group("pathname")
- isError = (match.group("errwarn") == "error")
+ # bdc orig line: isError = (match.group("errwarn") == "error")
+ # b bdc check for D errors
+ if pathname.endswith(".d"):
+ isError = True
+ else:
+ isError = (match.group("errwarn") == "error")
+ # e bdc check for D errors
+
if self._worthHighlighting(pathname, isError):
msg = match.group("error_msg")
lineNum = match.group("line_num")

0 comments on commit 1fe717e

Please sign in to comment.