emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 873a0a1508 1/2: Add support for TypeScript compilation to compi


From: Theodor Thornhill
Subject: emacs-29 873a0a1508 1/2: Add support for TypeScript compilation to compile.el (bug#61104)
Date: Sat, 4 Feb 2023 03:20:41 -0500 (EST)

branch: emacs-29
commit 873a0a15085629ac54fdee609c82b66583e3aefc
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Theodor Thornhill <theo@thornhill.no>

    Add support for TypeScript compilation to compile.el (bug#61104)
    
    * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
    Add regexps.
---
 lisp/progmodes/compile.el | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 5758eadf99..1e57d0b7bb 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -649,6 +649,24 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = 
\\([0-9]+\\)\\)?"
     ;; we do not know what lines will follow.
     (guile-file "^In \\(.+\\..+\\):\n" 1 nil nil 0)
     (guile-line "^ *\\([0-9]+\\): *\\([0-9]+\\)" nil 1 2)
+
+    ;; Typescript compilation prior to tsc version 2.7, "plain" format:
+    ;; greeter.ts(30,12): error TS2339: Property 'foo' does not exist.
+    (typescript-tsc-plain
+     ,(concat
+      "^[[:blank:]]*"
+      "\\([^(\r\n)]+\\)(\\([0-9]+\\),\\([0-9]+\\)):[[:blank:]]+"
+      "error [[:alnum:]]+: [^\r\n]+$")
+     1 2 3 2)
+
+    ;; Typescript compilation after tsc version 2.7, "pretty" format:
+    ;; src/resources/document.ts:140:22 - error TS2362: something.
+    (typescript-tsc-pretty
+     ,(concat
+       "^[[:blank:]]*"
+       "\\([^(\r\n)]+\\):\\([0-9]+\\):\\([0-9]+\\) - [[:blank:]]*"
+       "error [[:alnum:]]+: [^\r\n]+$")
+     1 2 3 2)
     ))
   "Alist of values for `compilation-error-regexp-alist'.")
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]