Skip to content

Commit

Permalink
Fix CR handling
Browse files Browse the repository at this point in the history
  • Loading branch information
livid-burner authored and lierdakil committed Apr 26, 2022
1 parent 18e82a2 commit 0d3f890
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ runProgram :: (LexerWriter lang, ParserWriter parser lang) =>
Proxy lang -> Proxy parser -> MainProgram
runProgram lang parserMethod debugLexer parserName baseFileName inputFile = do
input <- decodeUtf8 <$> BS.readFile inputFile
let (lexicRaw, grammarLines) = second (drop 1) . break ((=="%%") . T.filter (/='\r')) $ T.lines input
let (lexicRaw, grammarLines) = second (drop 1) . break (=="%%") $ T.lines $ T.filter (/='\r') input
rootdir = takeDirectory inputFile
grammar = T.unlines grammarLines
lexic = filter (not . T.null) lexicRaw
lexic = filter (not . T.null . T.strip) lexicRaw
setCurrentDirectory rootdir
runInIO $ do
writeFiles =<< makeLexer lang debugLexer lexic
Expand Down
2 changes: 1 addition & 1 deletion alpaca-parser-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: alpaca-parser-generator
version: 0.3.0.1
version: 0.3.0.2
author: Nikolay Yakimov
maintainer: root@livid.pp.ru
license: MIT
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: alpaca-parser-generator
version: '0.3.0.1'
version: '0.3.0.2'
author: Nikolay Yakimov
maintainer: root@livid.pp.ru
license: MIT
Expand Down

0 comments on commit 0d3f890

Please sign in to comment.