Compare commits
1 commit
dev
...
improve-te
| Author | SHA1 | Date | |
|---|---|---|---|
| 21241d44ed |
1 changed files with 2 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ import Types
|
||||||
import Data.String (IsString (..))
|
import Data.String (IsString (..))
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Text.Parsec.Pos
|
import Text.Parsec.Pos
|
||||||
|
import GHC.Stack
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = hspec $ do
|
main = hspec $ do
|
||||||
|
|
@ -185,6 +186,7 @@ instance IsString (Doc String) where
|
||||||
|
|
||||||
shouldLexTo :: String -> [(Int, Int, Token)] -> Expectation
|
shouldLexTo :: String -> [(Int, Int, Token)] -> Expectation
|
||||||
shouldLexTo input expected =
|
shouldLexTo input expected =
|
||||||
|
withFrozenCallStack $
|
||||||
case lexer input of
|
case lexer input of
|
||||||
Right tokens -> do
|
Right tokens -> do
|
||||||
let actual = map (\(pos, tok) -> (sourceLine pos, sourceColumn pos, tok)) tokens
|
let actual = map (\(pos, tok) -> (sourceLine pos, sourceColumn pos, tok)) tokens
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue