private void Recompile() { AbstractSyntaxTree = null; IntermediateLanguage = null; CompilerErrors = string.Empty; try { var program = Parser.parse(_sourceCode); AbstractSyntaxTree = program.Select(x => new DeclarationItem(x)); var semanticAnalysisResult = SemanticAnalysis.analyze(program); IntermediateLanguage = new ILBuilder(semanticAnalysisResult).BuildClass(program); } catch (CompilerException ex) { CompilerErrors = ex.Message; } }