Skip to content

Commit

Permalink
Added option to modify whiteSpace behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
doppioandante committed May 7, 2015
1 parent 6fabd83 commit 85a6343
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Text/Parsec/Language.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ module Text.Parsec.Language
, GenLanguageDef
) where

import Data.Char (isSpace)

import Text.Parsec
import Text.Parsec.Token

Expand Down Expand Up @@ -88,6 +90,7 @@ emptyDef = LanguageDef
, reservedOpNames= []
, reservedNames = []
, caseSensitive = True
, spaceFunc = isSpace
}


Expand Down
2 changes: 1 addition & 1 deletion Text/Parsec/Token.hs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ makeTokenParser languageDef


simpleSpace =
skipMany1 (satisfy isSpace)
skipMany1 (satisfy $ spaceFunc languageDef)

oneLineComment =
do{ try (string (commentLine languageDef))
Expand Down

0 comments on commit 85a6343

Please sign in to comment.