public Declaration.File ParseAst(SourceFile source) { var lexer = new Lexer(source); lexer.SyntaxError += OnSyntaxError; var parser = new Parser(lexer.Lex()); parser.SyntaxError += OnSyntaxError; var prg = parser.ParseFile(); var ast = ParseTreeToAst.Convert(prg); ast = new Desugaring().Desugar(ast); PhaseComplete?.Invoke(this); return(ast); }
public void TypeCheck(Node node) { typeCheck.Check(node); PhaseComplete?.Invoke(this); }