glualint-1.24.6: Attempts to fix your syntax erroring Lua files.
Safe HaskellSafe-Inferred
LanguageHaskell2010

GLua.TokenTypes

Description

Contains class instances and functions related to tokens

Synopsis

Documentation

type MTokenAlgebra mtok = Region -> Token -> mtok Source #

Metatoken algebra

before :: Region -> Region -> Bool Source #

Whether the first region ends strictly before the second region starts

beforeOrOnLine :: Region -> Region -> Bool Source #

Whether the first region ends before or on the same line as the second region

beforeEnd :: Region -> Region -> Bool Source #

Whether the first region ends before the second region ends

beforeEndLine :: Region -> Region -> Bool Source #

Whether the first region ends before or on the same line as the END of the second region

upto :: Region -> Region -> Region Source #

Returns a region that starts at the start of the first region and ends BEFORE the start of the second region

foldMToken :: MTokenAlgebra t -> MToken -> t Source #

Fold over metatoken

mFold :: TokenAlgebra a -> MToken -> a Source #

mFold: Apply a TokenAlgebra to an MToken

type TokenAlgebra token = ((String -> token, String -> token, Int -> String -> token, String -> token, String -> token, token), (String -> token, String -> token, String -> token, String -> token, token, token, token, token), (token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token), (token, token, token, token, token, token, token, token, token, token, token, token, token, token, token, token), (token, token, token, token, token, token), (String -> token, String -> token)) Source #

Huge token algebra

foldToken :: TokenAlgebra t -> Token -> t Source #

Fold over token definition

isWhitespace :: MToken -> Bool Source #

Whether an mtoken is a comment

isComment :: MToken -> Bool Source #

Whether an mtoken is a comment

splitComments :: [MToken] -> ([MToken], [MToken]) Source #

Split the tokens by comments and other tokens

tokenSize :: Token -> Int Source #

The size of a token in characters

Orphan instances

FromJSON MToken Source # 
Instance details

FromJSON Region Source # 
Instance details

FromJSON Token Source # 
Instance details

FromJSON LineColPos Source # 
Instance details

ToJSON MToken Source # 
Instance details

ToJSON Region Source # 
Instance details

ToJSON Token Source # 
Instance details

ToJSON LineColPos Source # 
Instance details

Generic MToken Source # 
Instance details

Associated Types

type Rep MToken :: Type -> Type #

Methods

from :: MToken -> Rep MToken x #

to :: Rep MToken x -> MToken #

Show MToken Source # 
Instance details

Show Token Source #

Simple show instance

Instance details

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Eq MToken Source #

Simple EQ instance. TODO: check for position equality

Instance details

Methods

(==) :: MToken -> MToken -> Bool #

(/=) :: MToken -> MToken -> Bool #

Eq Region Source # 
Instance details

Methods

(==) :: Region -> Region -> Bool #

(/=) :: Region -> Region -> Bool #

Eq LineColPos Source # 
Instance details

Ord MToken Source #

Simple Ord instance. TODO: check for position Ord

Instance details

Ord Region Source # 
Instance details

Ord LineColPos Source # 
Instance details