~ubuntu-branches/ubuntu/trusty/highlighting-kate/trusty-proposed

« back to all changes in this revision

Viewing changes to Text/Highlighting/Kate/Syntax/Eiffel.hs

  • Committer: Package Import Robot
  • Author(s): Clint Adams, Joachim Breitner, Clint Adams
  • Date: 2013-11-24 19:45:33 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20131124194533-gdl4ewd7et1laiq4
Tags: 0.5.5.1-1
[ Joachim Breitner ]
* Adjust watch file to new hackage layout

[ Clint Adams ]
* New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
highlight input = evalState (mapM parseSourceLine $ lines input) startingState
25
25
 
26
26
parseSourceLine :: String -> State SyntaxState SourceLine
27
 
parseSourceLine = mkParseSourceLine parseExpression
 
27
parseSourceLine = mkParseSourceLine (parseExpression Nothing)
28
28
 
29
29
-- | Parse an expression using appropriate local context.
30
 
parseExpression :: KateParser Token
31
 
parseExpression = do
32
 
  (lang,cont) <- currentContext
 
30
parseExpression :: Maybe (String,String)
 
31
                -> KateParser Token
 
32
parseExpression mbcontext = do
 
33
  (lang,cont) <- maybe currentContext return mbcontext
33
34
  result <- parseRules (lang,cont)
34
35
  optional $ do eof
35
36
                updateState $ \st -> st{ synStPrevChar = '\n' }