X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=spl.icl;h=93374a5cd2b49ca57ab30fa7cdcaee8969ce8bcb;hb=c270b0fc79caa24c08c2d00c2e8205bbd47921ed;hp=28b95fb9af33f1a3e8752d3141ba1c5c7d5d8a7b;hpb=022b8166504765b2c84138fc83dfdfaa23fe5774;p=cc1516.git diff --git a/spl.icl b/spl.icl index 28b95fb..93374a5 100644 --- a/spl.icl +++ b/spl.icl @@ -16,6 +16,7 @@ from Text import class Text(concat), instance Text String import parse import lex +import sem import AST from yard import :: Error, instance toString Error @@ -60,10 +61,15 @@ Start w stdin <<< "//LEXER\n" <<< printTokens toks <<< "//LEXER\n" _ = stdin) # parseOut = parser lexOut - # stdin = if (not args.parse) stdin (case parser lexOut of + # stdin = if (not args.parse) stdin (case parseOut of (Right ast) = stdin <<< "//PARSER\n" <<< toString ast <<< "//PARSER\n" (Left parse) = stdin <<< toString parse) + # semOut = sem parseOut + # stdin = case semOut of + (Right ast) = + stdin <<< "//TYPE\n" <<< toString ast <<< "//TYPE\n" + (Left parse) = stdin <<< toString parse = snd $ fclose stdin w where printTokens :: [Token] -> String