packages feed

ghc-syntax-highlighter 0.0.8.0 → 0.0.9.0

raw patch · 3 files changed

+33/−18 lines, 3 filesdep ~ghc-lib-parserdep ~text

Dependency ranges changed: ghc-lib-parser, text

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## GHC syntax highlighter 0.0.9.0++* Uses `ghc-lib-parser-9.4.1.x`.+ ## GHC syntax highlighter 0.0.8.0  * Uses `ghc-lib-parser-9.2.1.x`.
GHC/SyntaxHighlighter.hs view
@@ -37,6 +37,8 @@ import GHC.LanguageExtensions import qualified GHC.Parser.Lexer as L import GHC.Types.SrcLoc+import GHC.Utils.Error (DiagOpts (..))+import GHC.Utils.Outputable (defaultSDocContext)  ---------------------------------------------------------------------------- -- Data types@@ -133,12 +135,22 @@     parseState = L.initParserState parserOpts buffer location     parserOpts =       L.mkParserOpts-        ES.empty         (ES.fromList enabledExts)+        diagOpts+        []         True -- safe imports         True -- keep Haddock tokens         True -- keep comment tokens         False -- lex LINE and COLUMN pragmas+    diagOpts =+      DiagOpts+        { diag_warning_flags = ES.empty,+          diag_fatal_warning_flags = ES.empty,+          diag_warn_is_error = False,+          diag_reverse_errors = False,+          diag_max_errors = Nothing,+          diag_ppr_ctx = defaultSDocContext+        }  -- | The Haskell lexer. pLexer :: L.P [(Token, Loc)]@@ -185,6 +197,7 @@   -- Keywords   L.ITas -> KeywordTok   L.ITcase -> KeywordTok+  L.ITlcases -> KeywordTok   L.ITclass -> KeywordTok   L.ITdata -> KeywordTok   L.ITdefault -> KeywordTok@@ -261,6 +274,7 @@   L.ITincoherent_prag _ -> PragmaTok   L.ITctype _ -> PragmaTok   L.ITcomment_line_prag -> PragmaTok+  L.ITopaque_prag _ -> PragmaTok   -- Reserved symbols   L.ITdotdot -> SymbolTok   L.ITcolon -> SymbolTok@@ -352,10 +366,7 @@   L.ITunknown _ -> OtherTok   L.ITeof -> OtherTok -- normally is not included in results   -- Documentation annotations-  L.ITdocCommentNext {} -> CommentTok-  L.ITdocCommentPrev {} -> CommentTok-  L.ITdocCommentNamed {} -> CommentTok-  L.ITdocSection {} -> CommentTok+  L.ITdocComment {} -> CommentTok   L.ITdocOptions {} -> CommentTok   L.ITlineComment {} -> CommentTok   L.ITblockComment {} -> CommentTok
ghc-syntax-highlighter.cabal view
@@ -1,11 +1,11 @@-cabal-version:   1.18+cabal-version:   2.4 name:            ghc-syntax-highlighter-version:         0.0.8.0-license:         BSD3+version:         0.0.9.0+license:         BSD-3-Clause license-file:    LICENSE.md maintainer:      Mark Karpov <markkarpov92@gmail.com> author:          Mark Karpov <markkarpov92@gmail.com>-tested-with:     ghc ==8.10.7 ghc ==9.0.1 ghc ==9.2.1+tested-with:     ghc ==9.0.2 ghc ==9.2.4 ghc ==9.4.1 homepage:        https://github.com/mrkkrp/ghc-syntax-highlighter bug-reports:     https://github.com/mrkkrp/ghc-syntax-highlighter/issues synopsis:        Syntax highlighter for Haskell using the lexer of GHC@@ -31,8 +31,8 @@     default-language: Haskell2010     build-depends:         base >=4.13 && <5.0,-        ghc-lib-parser >=9.2 && <9.3,-        text >=0.2 && <1.3+        ghc-lib-parser >=9.4 && <9.5,+        text >=0.2 && <2.1      if flag(dev)         ghc-options:@@ -43,16 +43,16 @@         ghc-options: -O2 -Wall  test-suite tests-    type:             exitcode-stdio-1.0-    main-is:          Spec.hs-    build-tools:      hspec-discover >=2.0 && <3.0-    hs-source-dirs:   tests-    other-modules:    GHC.SyntaxHighlighterSpec-    default-language: Haskell2010+    type:               exitcode-stdio-1.0+    main-is:            Spec.hs+    build-tool-depends: hspec-discover:hspec-discover >=2.0 && <3.0+    hs-source-dirs:     tests+    other-modules:      GHC.SyntaxHighlighterSpec+    default-language:   Haskell2010     build-depends:         base >=4.13 && <5.0,         ghc-syntax-highlighter,-        text >=0.2 && <1.3,+        text >=0.2 && <2.1,         hspec >=2.0 && <3.0      if flag(dev)