[gedit] external tools: recognize Free Pascal error output
- From: Adam Dingle <adamd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] external tools: recognize Free Pascal error output
- Date: Sun, 8 Oct 2017 08:16:03 +0000 (UTC)
commit df2a0c6c59bceb92084d9ce09be00f3a4669cf04
Author: Adam Dingle <adam medovina org>
Date: Fri Sep 29 09:40:31 2017 +0200
external tools: recognize Free Pascal error output
https://bugzilla.gnome.org/show_bug.cgi?id=788325
plugins/externaltools/tools/linkparsing.py | 5 +++--
plugins/externaltools/tools/linkparsing_test.py | 8 ++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/plugins/externaltools/tools/linkparsing.py b/plugins/externaltools/tools/linkparsing.py
index 96ebecb..d9c09a5 100644
--- a/plugins/externaltools/tools/linkparsing.py
+++ b/plugins/externaltools/tools/linkparsing.py
@@ -237,15 +237,16 @@ REGEXP_PERL = r"""
)"""
# mcs (C#) 'Test.cs(12,7): error CS0103: The name `fakeMethod'
+# fpc (Pascal) 'hello.pas(11,1) Fatal: Syntax error, ":" expected but "BEGIN"'
REGEXP_MCS = r"""
^
(?P<lnk>
- (?P<pth> .*\.[cC][sS] )
+ (?P<pth> \S+ )
\(
(?P<ln> \d+ )
,\d+\)
)
-\:\s
+\:?\s
"""
# ex:ts=4:et:
diff --git a/plugins/externaltools/tools/linkparsing_test.py b/plugins/externaltools/tools/linkparsing_test.py
index cf9e832..ca65a09 100644
--- a/plugins/externaltools/tools/linkparsing_test.py
+++ b/plugins/externaltools/tools/linkparsing_test.py
@@ -189,6 +189,14 @@ test.rb:5: undefined method `fake_method' for main:Object (NoMethodError)
self.assert_link(lnk, "Test.cs", 12)
self.assert_link_text(line, lnk, 'Test.cs(12,7)')
+ def test_parse_pas_one_line(self):
+ line = 'hello.pas(11,1) Fatal: Syntax error, ":" expected but "BEGIN"'
+ links = self.p.parse(line)
+ self.assert_link_count(links, 1)
+ lnk = links[0]
+ self.assert_link(lnk, "hello.pas", 11)
+ self.assert_link_text(line, lnk, 'hello.pas(11,1)')
+
if __name__ == '__main__':
unittest.main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]