void CompileClassDeclaration(ClassDeclaration classDeclaration) { var type = typeDefinitionByName[classDeclaration.Name]; foreach (var classMethod in classDeclaration.Members.OfType <ClassMethod>()) { var method = classMethodDefinitionByNode[classMethod]; MethodBodyCompiler.Compile(sourceFile, allTypes, method, classMethod.Body.Statements); } }
void CompileMainMethod() { MethodBodyCompiler.Compile(sourceFile, allTypes, MainMethod, programNode.Statements); }
void CompileFunctionDeclaration(FunctionDeclaration functionDeclaration) { var method = functionMethodDefinitionByNode[functionDeclaration]; MethodBodyCompiler.Compile(sourceFile, allTypes, method, functionDeclaration.Body.Statements); }