shimmer-0.1.3.4: The Reflective Lambda Machine
SMR.Source.Token
data Token Source #
Tokens for for the source language.
Constructors
End of input.
Punctuation character.
A scoped name.
A literal natural number.
A literal text string.
Defined in SMR.Source.Token
Methods
(==) :: Token -> Token -> Bool #
(/=) :: Token -> Token -> Bool #
showsPrec :: Int -> Token -> ShowS #
show :: Token -> String #
showList :: [Token] -> ShowS #
data Space Source #
Name space of a name.
Local variable.
Macro name.
Symbol name.
Set name.
Primitive name.
Keyword (super primitive)
Nominal name.
(==) :: Space -> Space -> Bool #
(/=) :: Space -> Space -> Bool #
showsPrec :: Int -> Space -> ShowS #
show :: Space -> String #
showList :: [Space] -> ShowS #
isToken :: Token -> Token -> Bool Source #
Check if a token is equal to the give none.
isKPunc :: Char -> Token -> Bool Source #
Check is token is punctuation using the given character.
takeNameOfToken :: Space -> Token -> Maybe Text Source #
Take the name from a token, if any.
takeAnyNameOfToken :: Token -> Maybe (Space, Text) Source #
takeNatOfToken :: Token -> Maybe Integer Source #
Take the natural number from a token, if any.
takeTextOfToken :: Token -> Maybe Text Source #
Take the text string from a token, if any.