language-lua-0.11.0.2: Lua parser and pretty-printer
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Lua.Annotated.Lexer

Synopsis

Documentation

llex Source #

Arguments

:: Text

chunk

-> [Lexeme Token] 

Lua lexer with default =string name.

llexNamed Source #

Arguments

:: String

name

-> Text

chunk

-> [Lexeme Token] 

Lua lexer with explicit name.

llexNamedWithWhiteSpace Source #

Arguments

:: String

name

-> Text

chunk

-> [Lexeme Token] 

Lua lexer with explicit name, preseves white space and comments.

llexFile :: FilePath -> IO [Lexeme Token] Source #

Run Lua lexer on a file.

data SourcePos #

Constructors

SourcePos 

Instances

Instances details
HasRange SourcePos 
Instance details

Defined in AlexTools

Show SourcePos 
Instance details

Defined in AlexTools

NFData SourcePos 
Instance details

Defined in AlexTools

Methods

rnf :: SourcePos -> () #

Eq SourcePos 
Instance details

Defined in AlexTools

Lift SourcePos 
Instance details

Defined in AlexTools

Methods

lift :: Quote m => SourcePos -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SourcePos -> Code m SourcePos #

data SourceRange #

A range in the source code.

Constructors

SourceRange 

Instances

Instances details
HasRange SourceRange 
Instance details

Defined in AlexTools

Show SourceRange 
Instance details

Defined in AlexTools

NFData SourceRange 
Instance details

Defined in AlexTools

Methods

rnf :: SourceRange -> () #

Eq SourceRange 
Instance details

Defined in AlexTools

Lift SourceRange 
Instance details

Defined in AlexTools

Methods

lift :: Quote m => SourceRange -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => SourceRange -> Code m SourceRange #

dropWhiteSpace :: [Lexeme Token] -> [Lexeme Token] Source #

This function drops whitespace and comments from a list of lexemes in order to make it suitable for parsing.

data Lexeme t #

Constructors

Lexeme 

Instances

Instances details
HasRange (Lexeme t) 
Instance details

Defined in AlexTools

Methods

range :: Lexeme t -> SourceRange #

Show t => Show (Lexeme t) 
Instance details

Defined in AlexTools

Methods

showsPrec :: Int -> Lexeme t -> ShowS #

show :: Lexeme t -> String #

showList :: [Lexeme t] -> ShowS #

NFData t => NFData (Lexeme t) 
Instance details

Defined in AlexTools

Methods

rnf :: Lexeme t -> () #

Eq t => Eq (Lexeme t) 
Instance details

Defined in AlexTools

Methods

(==) :: Lexeme t -> Lexeme t -> Bool #

(/=) :: Lexeme t -> Lexeme t -> Bool #