fast-tags-2.0.0: Fast incremental vi and emacs tags.

Copyright(c) Sergey Vinokurov 2019
Safe HaskellNone
LanguageHaskell98

FastTags.LexerM

Contents

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

data AlexInput Source #

Constructors

AlexInput 

Fields

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