fast-tags-2.0.2: Fast incremental vi and emacs tags.
Copyright(c) Sergey Vinokurov 2019
Safe HaskellNone
LanguageHaskell2010

FastTags.LexerM

Description

All the types and functions needed to make lexer run: - AlexInput - primary workhorse, an optimized representation of input stream as a pointer to utf8 bytes and our position within it. - Lexer monad AlexM - a monad (self-explanatory) with state that describes current lexing context. - AlexState - state of the lexing monad, maintains current Alex code, comment depth, quasiquoter depth, indentation size, whether we're in a literate mode (and in which one) or vanilla mode and whether there are any TH quasiquotes present till the end of file.

All the functions are to do with

Synopsis

Documentation

data AlexState Source #

Constructors

AlexState 

Fields

Instances

Instances details
Eq AlexState Source # 
Instance details

Defined in FastTags.LexerM

Ord AlexState Source # 
Instance details

Defined in FastTags.LexerM

Show AlexState Source # 
Instance details

Defined in FastTags.LexerM

data AlexInput Source #

Constructors

AlexInput 

Fields

Instances

Instances details
Eq AlexInput Source # 
Instance details

Defined in FastTags.LexerM

Ord AlexInput Source # 
Instance details

Defined in FastTags.LexerM

Show AlexInput Source # 
Instance details

Defined in FastTags.LexerM

aiLineL :: Lens' AlexInput Line Source #

Current line in input stream.

dropUntilNLOrEither :: Word8 -> Word8 -> AlexInput -> AlexInput Source #

Drop until either of two bytes.

asCodeL :: Lens' AlexState AlexCode Source #

Current Alex state the lexer is in. E.g. comments, string, TH quasiquoter or vanilla toplevel mode.

asPreprocessorDepthL :: Lens' AlexState Int16 Source #

How many directives deep are we.

asLiterateLocL :: Lens' AlexState (LitMode LitStyle) Source #

Whether we're in bird-style or latex-style literate environment

Alex interface