[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode b12e49a 086/385: consym
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode b12e49a 086/385: consym |
Date: |
Tue, 5 Oct 2021 23:59:07 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit b12e49aa446157560432ef2e0fc8c7265b17eca2
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
consym
---
haskell-tng-font-lock.el | 6 +++---
haskell-tng-lexer.el | 12 ++++++++----
test/src/medley.hs.lexer | 20 ++++++++++----------
3 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/haskell-tng-font-lock.el b/haskell-tng-font-lock.el
index 2a4fb92..da9980f 100644
--- a/haskell-tng-font-lock.el
+++ b/haskell-tng-font-lock.el
@@ -103,11 +103,11 @@
(: symbol-start (char ?\\))))
"reservedid / reservedop")
-(defconst haskell-tng:regexp:varid
+(defconst haskell-tng:regexp:qvarid
(rx-to-string `(: symbol-start (opt ,haskell-tng:rx:qual)
,haskell-tng:rx:varid symbol-end)))
-(defconst haskell-tng:regexp:conid
+(defconst haskell-tng:regexp:qconid
(rx-to-string `(: symbol-start (opt ,haskell-tng:rx:qual)
,haskell-tng:rx:conid symbol-end)))
-(defconst haskell-tng:regexp:consym
+(defconst haskell-tng:regexp:qconsym
(rx-to-string `(: ,haskell-tng:rx:consym symbol-end)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/haskell-tng-lexer.el b/haskell-tng-lexer.el
index 29633a3..830f6b2 100644
--- a/haskell-tng-lexer.el
+++ b/haskell-tng-lexer.el
@@ -84,10 +84,12 @@ the lexer."
;; known identifiers
((looking-at haskell-tng:regexp:reserved)
(haskell-tng-lexer:last-match))
- ((looking-at haskell-tng:regexp:varid)
+ ((looking-at haskell-tng:regexp:qvarid)
(haskell-tng-lexer:last-match nil "VARID"))
- ((looking-at haskell-tng:regexp:conid)
+ ((looking-at haskell-tng:regexp:qconid)
(haskell-tng-lexer:last-match nil "CONID"))
+ ((looking-at haskell-tng:regexp:qconsym)
+ (haskell-tng-lexer:last-match nil "CONSYM"))
;; TODO symid
;; TODO numeric literals
;; TODO l1==l2 is not parsed correctly as VARID SYMID VARID
@@ -134,10 +136,12 @@ the lexer."
;; known identifiers
((looking-back haskell-tng:regexp:reserved (- (point) 8))
(haskell-tng-lexer:last-match 'reverse))
- ((looking-back haskell-tng:regexp:varid lbp 't)
+ ((looking-back haskell-tng:regexp:qvarid lbp 't)
(haskell-tng-lexer:last-match 'reverse "VARID"))
- ((looking-back haskell-tng:regexp:conid lbp 't)
+ ((looking-back haskell-tng:regexp:qconid lbp 't)
(haskell-tng-lexer:last-match 'reverse "CONID"))
+ ((looking-back haskell-tng:regexp:qconsym lbp 't)
+ (haskell-tng-lexer:last-match 'reverse "CONSYM"))
((looking-back (rx (+ (| (syntax word) (syntax symbol)))) lbp 't)
(haskell-tng-lexer:last-match 'reverse))
(t
diff --git a/test/src/medley.hs.lexer b/test/src/medley.hs.lexer
index 7070521..22a7910 100644
--- a/test/src/medley.hs.lexer
+++ b/test/src/medley.hs.lexer
@@ -26,7 +26,7 @@ VARID CONID
CONID ,
VARID ,
CONID »
-; import CONID « VARID , CONID « CONID , « :< » »
+; import CONID « VARID , CONID « CONID , « CONSYM » »
; import CONID « CONID « .. » , VARID , VARID ,
VARID , VARID , VARID , VARID ,
VARID , CONID »
@@ -112,15 +112,15 @@ VARID § » »
; type CONID
; type CONID =
-§ :> CONID § CONID :> CONID § CONID
-:> CONID § CONID
-:> CONID CONID CONID
-:> CONID
-:> CONID ' « CONID » « CONID CONID »
-:<|> § :> CONID ' « CONID » CONID
-:> CONID CONID CONID
-:> CONID
-:> CONID ' « CONID » « CONID CONID »
+§ CONSYM CONID § CONID CONSYM CONID § CONID
+CONSYM CONID § CONID
+CONSYM CONID CONID CONID
+CONSYM CONID
+CONSYM CONID ' « CONID » « CONID CONID »
+CONSYM § CONSYM CONID ' « CONID » CONID
+CONSYM CONID CONID CONID
+CONSYM CONID
+CONSYM CONID ' « CONID » « CONID CONID »
; deriving instance CONID CONID
; deriving VARID instance CONID CONID
- [nongnu] elpa/haskell-tng-mode 0ac5a2f 059/385: copyright years and move the test assertions, (continued)
- [nongnu] elpa/haskell-tng-mode 0ac5a2f 059/385: copyright years and move the test assertions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a6bb27e 061/385: [ci skip] layout algorithm implemented and tested, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 7d2863e 065/385: tests for SMIE state invalidation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 41a29dd 066/385: backward lexer, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c48e7a5 069/385: starting to transcribe the expression table, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1f1110a 073/385: transcribe the grammar rules, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 01789b1 075/385: y u no haskell-mode?, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b8f3e3f 079/385: back out incomplete grammar rules, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 9e19b2b 080/385: double down on simpler grammar, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6e7a24f 083/385: lexer identifies conid / varid, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b12e49a 086/385: consym,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 7d6fa3d 091/385: thoughts on lexers, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6a05d12 090/385: planning for indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2060f7a 092/385: thoughts on indentation testing, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6d2d764 094/385: skeleton for indentation tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 0d04664 115/385: implement batch compilation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode adb3c50 143/385: better insert indentation suggestions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e79577e 132/385: match ghc source paths when compiling, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8ec4807 145/385: somehow dropped font-lock-extend-region-multiline, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode d3a6a22 147/385: no todos in the test/src dir, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 85f20b1 154/385: indent coproducts, ELPA Syncer, 2021/10/06