X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/RecoveredElement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/RecoveredElement.java index 4cf3d75..6df1686 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/RecoveredElement.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/RecoveredElement.java @@ -10,7 +10,7 @@ *******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.parser; -import net.sourceforge.phpdt.internal.compiler.ast.ASTNode; +//import net.sourceforge.phpdt.internal.compiler.ast.ASTNode; import net.sourceforge.phpdt.internal.compiler.ast.Block; import net.sourceforge.phpdt.internal.compiler.ast.Statement; @@ -27,16 +27,16 @@ public class RecoveredElement { protected Parser recoveringParser; - public RecoveredElement(RecoveredElement parent, int bracketBalance) { - this(parent, bracketBalance, null); - } +// public RecoveredElement(RecoveredElement parent, int bracketBalance) { +// this(parent, bracketBalance, null); +// } - public RecoveredElement(RecoveredElement parent, int bracketBalance, - Parser parser) { - this.parent = parent; - this.bracketBalance = bracketBalance; - this.recoveringParser = parser; - } +// public RecoveredElement(RecoveredElement parent, int bracketBalance, +// Parser parser) { +// this.parent = parent; +// this.bracketBalance = bracketBalance; +// this.recoveringParser = parser; +// } /* * Record a method declaration @@ -147,13 +147,13 @@ public class RecoveredElement { /* * Answer the depth of this element, considering the parent link. */ - public int depth() { - int depth = 0; - RecoveredElement current = this; - while ((current = current.parent) != null) - depth++; - return depth; - } +// public int depth() { +// int depth = 0; +// RecoveredElement current = this; +// while ((current = current.parent) != null) +// depth++; +// return depth; +// } /* * Answer the enclosing method node, or null if none @@ -211,9 +211,9 @@ public class RecoveredElement { /* * Answer the associated parsed structure */ - public ASTNode parseTree() { - return null; - } +// public ASTNode parseTree() { +// return null; +// } /* * Iterate the enclosing blocks and tag them so as to preserve their content @@ -261,17 +261,17 @@ public class RecoveredElement { /* * Answer the very source end of the corresponding parse node */ - public int sourceEnd() { - return 0; - } - - protected String tabString(int tab) { - StringBuffer result = new StringBuffer(); - for (int i = tab; i > 0; i--) { - result.append(" "); //$NON-NLS-1$ - } - return result.toString(); - } +// public int sourceEnd() { +// return 0; +// } + +// protected String tabString(int tab) { +// StringBuffer result = new StringBuffer(); +// for (int i = tab; i > 0; i--) { +// result.append(" "); //$NON-NLS-1$ +// } +// return result.toString(); +// } /* * Answer the top node @@ -316,39 +316,39 @@ public class RecoveredElement { * Update the corresponding parse node from parser state which is about to * disappear because of restarting recovery */ - public void updateFromParserState() { - } +// public void updateFromParserState() { +// } /* * A closing brace got consumed, might have closed the current element, in * which case both the currentElement is exited */ - public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd) { - if ((--bracketBalance <= 0) && (parent != null)) { - this.updateSourceEndIfNecessary(braceEnd); - return parent; - } - return this; - } +// public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd) { +// if ((--bracketBalance <= 0) && (parent != null)) { +// this.updateSourceEndIfNecessary(braceEnd); +// return parent; +// } +// return this; +// } /* * An opening brace got consumed, might be the expected opening one of the * current element, in which case the bodyStart is updated. */ - public RecoveredElement updateOnOpeningBrace(int braceEnd) { - - if (bracketBalance++ == 0) { - this.updateBodyStart(braceEnd + 1); - return this; - } - return null; // no update is necessary - } +// public RecoveredElement updateOnOpeningBrace(int braceEnd) { +// +// if (bracketBalance++ == 0) { +// this.updateBodyStart(braceEnd + 1); +// return this; +// } +// return null; // no update is necessary +// } /* * Final update the corresponding parse node */ - public void updateParseTree() { - } +// public void updateParseTree() { +// } /* * Update the declarationSourceEnd of the corresponding parse node