From d89a172db0a1a7cdd777c2787ed5057e63e53f7c Mon Sep 17 00:00:00 2001 From: kpouer Date: Mon, 11 Aug 2003 22:23:47 +0000 Subject: [PATCH] added the method codeAnalysis() with an empty default implementation --- .../phpdt/internal/compiler/ast/AstNode.java | 23 ++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AstNode.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AstNode.java index 237ce92..56dddfd 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AstNode.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/AstNode.java @@ -1,6 +1,7 @@ package net.sourceforge.phpdt.internal.compiler.ast; import java.util.List; +import java.util.ArrayList; /** * It will be the mother of our own ast tree for php just like the ast tree of Eclipse. @@ -67,4 +68,26 @@ public abstract class AstNode { * @return the variables used */ public abstract List getUsedVariable(); + + /** + * This method will analyze the code. + * by default it will do nothing + */ + public void analyzeCode() { + } + + /** + * Check if the array array contains the object o + * @param array an array + * @param o an obejct + * @return true if the array contained the object o + */ + public boolean arrayContains(Object[] array, Object o) { + for (int i = 0; i < array.length; i++) { + if (array[i].equals(o)) { + return true; + } + } + return false; + } } -- 1.7.1