1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Rename Parser to Parsing.Parser.

This commit is contained in:
Rob Rix 2017-11-27 13:24:45 -05:00
parent 9bfd64905d
commit dbb1a33fca
11 changed files with 15 additions and 14 deletions

2
.ghci
View File

@ -25,7 +25,7 @@ assignmentExample lang = case lang of
"Markdown" -> mk "md" "markdown"
"JSON" -> mk "json" "json"
_ -> mk "" ""
where mk fileExtension parser = putStrLn ("example: fmap (() <$) . runTask . parse " ++ parser ++ "Parser =<< Semantic.Util.file \"example." ++ fileExtension ++ "\"") >> return ("import Parser\nimport Semantic.Task\nimport Semantic.Util")
where mk fileExtension parser = putStrLn ("example: fmap (() <$) . runTask . parse " ++ parser ++ "Parser =<< Semantic.Util.file \"example." ++ fileExtension ++ "\"") >> return ("import Parsing.Parser\nimport Semantic.Task\nimport Semantic.Util")
:}
:undef assignment
:def assignment assignmentExample

View File

@ -63,9 +63,9 @@ library
, Language.Python.Assignment
, Language.Python.Grammar
, Language.Python.Syntax
, Parser
, Parser.CMark
, Parser.TreeSitter
, Parsing.Parser
, Parsing.CMark
, Parsing.TreeSitter
, Paths_semantic_diff
, Renderer
, Renderer.JSON

View File

@ -19,7 +19,7 @@ import qualified Data.Text as Text
import Data.Text.Encoding (encodeUtf8)
import Data.Union
import GHC.Stack
import Parser.CMark as Grammar (Grammar(..))
import Parsing.CMark as Grammar (Grammar(..))
import qualified Language.Markdown.Syntax as Markup
type Syntax =

1
src/Parsing/AST.hs Normal file
View File

@ -0,0 +1 @@
module Parsing.AST where

View File

@ -1,5 +1,5 @@
{-# LANGUAGE DataKinds, TypeOperators #-}
module Parser.CMark
module Parsing.CMark
( Grammar(..)
, cmarkParser
, toGrammar

View File

@ -1,5 +1,5 @@
{-# LANGUAGE ConstraintKinds, DataKinds, GADTs, RankNTypes, ScopedTypeVariables, TypeFamilies, TypeOperators #-}
module Parser
module Parsing.Parser
( Parser(..)
, SomeParser(..)
, someParser

View File

@ -1,5 +1,5 @@
{-# LANGUAGE DataKinds, ScopedTypeVariables, TypeOperators #-}
module Parser.TreeSitter
module Parsing.TreeSitter
( treeSitterParser
, parseToAST
) where

View File

@ -27,7 +27,7 @@ import Decorator
import Info
import Diffing.Interpreter
import qualified Language
import Parser
import Parsing.Parser
import Renderer
import Semantic.Task as Task
import Semantic.Stat as Stat

View File

@ -47,9 +47,9 @@ import Data.Union
import Decorator (RAlgebra, decoratorWithAlgebra)
import Info hiding (Category(..))
import Language
import Parser
import Parser.CMark
import Parser.TreeSitter
import Parsing.Parser
import Parsing.CMark
import Parsing.TreeSitter
import System.Exit (die)
import System.IO (Handle, stderr)
import qualified Semantic.IO as IO

View File

@ -14,7 +14,7 @@ import Data.Span
import Data.Term
import Diffing.Algorithm
import Diffing.Interpreter
import Parser
import Parsing.Parser
import Renderer.TOC
import Semantic
import Semantic.IO as IO

View File

@ -26,6 +26,7 @@ import Info hiding (Go)
import Diffing.Algorithm.RWS
import Diffing.Interpreter
import Language
import Parsing.Parser
import Prelude hiding (readFile)
import Renderer
import Renderer.TOC
@ -38,7 +39,6 @@ import Test.Hspec (Spec, describe, it, parallel, pending)
import Test.Hspec.Expectations.Pretty
import Test.Hspec.LeanCheck
import Test.LeanCheck
import Parser
spec :: Spec
spec = parallel $ do