Changeset 14062 for src/Pugs/Lexer.hs
- Timestamp:
- 10/08/06 12:38:10 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Lexer.hs (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Lexer.hs
r13634 r14062 21 21 rule, verbatimRule, literalRule, 22 22 tryRule, tryVerbatimRule, 23 tryChoice, ruleComma, ruleWs,23 tryChoice, ruleComma, 24 24 25 25 ruleScope, ruleTrait, ruleTraitName, ruleBareTrait, ruleType, … … 32 32 import Pugs.Parser.Types 33 33 import Pugs.Parser.Charnames 34 import Text.ParserCombinators.Parsec.Pos (sourceColumn, sourceLine) 34 35 35 36 identStart, identLetter :: RuleParser Char … … 133 134 return contents 134 135 136 {- 135 137 -- The \b rule. 136 138 _ruleWordBoundary :: RuleParser () … … 154 156 SpaceClass -> whiteSpace 155 157 _ -> return () 158 -} 156 159 157 160 {-| … … 200 203 symbol s = try $ do 201 204 rv <- string s 202 let ahead = if isWordAny lastCh then aheadWord else aheadSym203 lastCh = last rv205 let lastCh = last s 206 ahead = if isWordAny lastCh then aheadWord else aheadSym 204 207 choice [ lookAhead (satisfy (ahead lastCh)), eof >> return ' ' ] 205 208 whiteSpace … … 530 533 simpleSpace :: RuleParser () 531 534 simpleSpace = do 532 skipMany1 (satisfy (isSpace)) 535 skipMany1 (satisfy isSpace) 536 pos <- getPosition 537 modify (\s -> s{ s_wsLine = sourceLine pos, s_wsColumn = sourceColumn pos }) 533 538 534 539 multiLineComment :: RuleParser ()
