void CompileFunctions() { foreach (var functionDeclaration in programNode.Declarations.OfType <FunctionDeclaration>()) { var md = functionMethodDefinitionByNode[functionDeclaration]; MethodBodyCompiler.Compile(sourceFile, types, md, functionDeclaration.Body.Statements); } }
void CompileClassMethods() { foreach (var classDeclaration in programNode.Declarations.OfType <ClassDeclaration>()) { var td = typeDefinitionByName[classDeclaration.Name]; foreach (var classMethod in classDeclaration.Members.OfType <ClassMethod>()) { var md = classMethodDefinitionByNode[classMethod]; MethodBodyCompiler.Compile(sourceFile, types, md, classMethod.Body.Statements); } } }
void CompileMainMethod() { MethodBodyCompiler.Compile(sourceFile, types, MainMethod, programNode.Statements); }