futhark-0.25.15: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Futhark.Parser.Lexer.Tokens

Description

Definition of the tokens used in the lexer.

Also defines other useful building blocks for constructing tokens.

Synopsis

Documentation

data Token Source #

A lexical token. It does not itself contain position information, so in practice the parser will consume tokens tagged with a source position.

Instances

Instances details
Show Token Source # 
Instance details

Defined in Language.Futhark.Parser.Lexer.Tokens

Eq Token Source # 
Instance details

Defined in Language.Futhark.Parser.Lexer.Tokens

Methods

(==) :: Token -> Token -> Bool Source #

(/=) :: Token -> Token -> Bool Source #

Ord Token Source # 
Instance details

Defined in Language.Futhark.Parser.Lexer.Tokens

tokenC :: a -> ByteString -> a Source #

tokenS :: (Text -> a) -> ByteString -> a Source #

suffZero :: Text -> Text Source #

Suffix a zero if the last character is dot.

tryRead :: Read a => String -> Text -> a Source #