public static void ResolveReturnStatemetsTypes(SyntaxTreeNode inNode) { foreach (ReturnStatement returnStatement in inNode.GetChildsByType(typeof(ReturnStatement), true)) { ResolveReturnStatementType(returnStatement); } }
public static void ResolveMethodInvokationStatementsTypes(SyntaxTreeNode inNode) { foreach (MethodInvokationStatement method in inNode.GetChildsByType(typeof(MethodInvokationStatement), true)) { ResolveMethodInvokationStatementTypes(method); } }
public static void ResolveMethodDeclarations(SyntaxTreeNode inNode) { foreach (MethodDeclaration method in inNode.GetChildsByType(typeof(MethodDeclaration), true)) { ResolveMethodDeclaration(method); } }
public static void ResolveAssignmentStatementsTypes(SyntaxTreeNode inNode) { foreach (AssignmentStatement assignment in inNode.GetChildsByType(typeof(AssignmentStatement), true)) { ResolveAssignmentStatementType(assignment); } }
public static void ResolveGlobalIdentifierDeclarations(SyntaxTreeNode inNode) { foreach (GlobalIdentifierDeclaration declaration in inNode.GetChildsByType(typeof(GlobalIdentifierDeclaration), true)) { ResolveGlobalIdentifierDeclaration(declaration); } }
public static void ResolveMethodInvokations(SyntaxTreeNode inNode, Table.Table table) { foreach (MethodInvokationExpression method in inNode.GetChildsByType(typeof(MethodInvokationExpression), true)) { ResolveMethodInvokation(method, table); } }
public static void ResolveArrayElements(SyntaxTreeNode inNode, Table.Table table) { foreach (ArrayElementExpression arrayElement in inNode.GetChildsByType(typeof(ArrayElementExpression), true)) { ResolveArrayElement(arrayElement, table); } }
private static void EmitMethodDeclarations(SyntaxTreeNode inNode) { foreach (MethodDeclaration method in inNode.GetChildsByType(typeof(MethodDeclaration), true)) { EmitMethodDeclaration(method); } }
public static void ResolveIdentifierExpressions(SyntaxTreeNode inNode, Table.Table table) { EmbeddedStatement body = (EmbeddedStatement)inNode.GetParentByType(typeof(EmbeddedStatement)); foreach (IdentifierExpression identifier in inNode.GetChildsByType(typeof(IdentifierExpression), true)) { ResolveIdentifierExpression(identifier, table, body); } }
public static void ResolveConditionExpressionsTypes(SyntaxTreeNode inNode) { foreach (IfStatement ifStatement in inNode.GetChildsByType(typeof(IfStatement), true)) { ResolveConditionExpressionType(ifStatement.Condition); } foreach (WhileLoopStatement whileStatement in inNode.GetChildsByType(typeof(WhileLoopStatement), true)) { ResolveConditionExpressionType(whileStatement.Condition); } foreach (DoLoopStatement doStatement in inNode.GetChildsByType(typeof(DoLoopStatement), true)) { ResolveConditionExpressionType(doStatement.Condition); } foreach (ForLoopStatement forStatement in inNode.GetChildsByType(typeof(ForLoopStatement), true)) { ResolveConditionExpressionType(forStatement.Condition); } }
public static void MarkMethods(SyntaxTreeNode module) { GlobalTable.Table = Table.Table.CreateTable(null, 1); foreach (MethodDeclaration method in module.GetChildsByType(typeof(MethodDeclaration), true)) { if (!GlobalTable.Table.PushMethod(method)) { ReportError(new MethodIsAlreadyDeclared(method.Name, method.SourceContext)); } } }
private static void EmitGlobalIdentifierDeclarations(SyntaxTreeNode inNode) { ConstructorBuilder constructor = Class.DefineConstructor(MethodAttributes.Static, CallingConventions.Standard, new Type[0]); ILGenerator constructorIL = constructor.GetILGenerator(); foreach (GlobalIdentifierDeclaration declaration in inNode.GetChildsByType(typeof(GlobalIdentifierDeclaration), true)) { EmitGlobalIdentifierDeclaration(declaration, constructorIL); } constructorIL.Emit(OpCodes.Ret); }
private static void MarkMethodDeclarations(SyntaxTreeNode inNode) { foreach (MethodDeclaration method in inNode.GetChildsByType(typeof(MethodDeclaration), true)) { Type[] argumentTypes = CreateTypes(method.GetArgumentsTypes()); MethodBuilder methodBuilder = Class.DefineMethod(method.Name, MethodAttributes.Static, method.ReturnType.GetEquivalence(), argumentTypes); if (!method.IsExternal) { Methods.Add(methodBuilder, argumentTypes); } else { ExternalMethods.Add(methodBuilder, argumentTypes); ExternalPackages.Add(method, method.NETPackage); } } }