ddc-source-tetra-0.4.2.1: Disciplined Disciple Compiler source language.

Safe HaskellNone
LanguageHaskell98

DDC.Source.Tetra.Lexer

Description

Lexer for Source Tetra tokens.

Synopsis

Documentation

lexModuleString :: String -> Int -> String -> [Token (Tok Name)] Source

Lex a string to tokens, using primitive names.

The first argument gives the starting source line number.

We're currently re-using the lexer for the core language, which has *mostly* the same lexical structure as Source Tetra. There are a few tokens accepted by one language but not the other, but it'll do for now.