Files
qbe-hs/src/Language/QBE/QQ.hs
Madeleine Sydney Ślaga c5f6ad4573
Some checks failed
build / build (push) Failing after 29s
wip: qq
2026-04-24 12:16:43 -06:00

44 lines
820 B
Haskell
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{-# LANGUAGE RankNTypes, TypeAbstractions, OverloadedStrings, ScopedTypeVariables #-}
module Language.QBE.QQ
( qbe
)
where
import qualified Language.Haskell.TH as TH
import Language.Haskell.TH.Quote
import Data.Void
import Text.Megaparsec
import Text.Megaparsec.Char
import qualified Text.Megaparsec.Char.Lexer as L
import Language.QBE
import Data.Proxy
type P = Parsec Void String
space = L.space space1 empty empty
lexeme = L.lexeme space1
symbol = L.symbol space1
ident :: Sigil -> P (Ident t)
ident (Proxy @t) = do
case t of
AggregateTy -> char ':'
Ident <$> ""
assignment :: P Assignment
assignment = do
ident
assignmentInst :: P Inst
assignmentInst = _
qbeQuoteExp :: String -> TH.ExpQ
qbeQuoteExp = _
qbe :: QuasiQuoter
qbe = QuasiQuoter
{ quoteExp = qbeQuoteExp
, quotePat = _
}