From 6426c4d00bb70c5410a4269a11ac288154f018f6 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 16 Feb 2006 08:25:28 +0000 Subject: [PATCH] checking in changes --- Robust/src/IR/Flat/BuildFlat.java | 46 ++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/Robust/src/IR/Flat/BuildFlat.java b/Robust/src/IR/Flat/BuildFlat.java index 32f6555b..8946b7f9 100644 --- a/Robust/src/IR/Flat/BuildFlat.java +++ b/Robust/src/IR/Flat/BuildFlat.java @@ -48,7 +48,51 @@ public class BuildFlat { return new NodePair(begin,end); } + private NodePair flattenExpressionNode(ExpressionNode en) { + + } + + private NodePair flattenDeclarationNode(DeclarationNode dn) { + + } + + private NodePair flattenIfStatementNode(IfStatementNode isn) { + + } + + private NodePair flattenLoopNode(LoopNode ln) { + + } + + private NodePair flattenReturnNode(ReturnNode rn) { + + } + + private NodePair flattenSubBlockNode(SubBlockNode sbn) { + + } + private NodePair flattenBlockStatementNode(BlockStatementNode bsn) { - return null; + switch(bsn.kind()) { + case Kind.BlockExpressionNode: + return flattenExpressionNode((ExpressionNode)bsn); + + case Kind.DeclarationNode: + return flattenDeclarationNode((DeclarationNode)bsn); + + case Kind.IfStatementNode: + return flattenIfStatementNode((IfStatementNode)bsn); + + case Kind.LoopNode: + return flattenLoopNode((LoopNode)bsn); + + case Kind.ReturnNode: + return flattenReturnNode((ReturnNode)bsn); + + case Kind.SubBlockNode: + return flattenSubBlockNode((SubBlockNode)bsn); + + } + throw new Error(); } } -- 2.34.1