Detect <?= as PHP start tag
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / internal / compiler / ast / Reference.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpeclipse.internal.compiler.ast;
12
13 import net.sourceforge.phpdt.internal.compiler.flow.FlowContext;
14 import net.sourceforge.phpdt.internal.compiler.flow.FlowInfo;
15 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
16 import net.sourceforge.phpdt.internal.compiler.lookup.FieldBinding;
17 import net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding;
18
19 public abstract class Reference extends Expression  {
20 /**
21  * BaseLevelReference constructor comment.
22  */
23 public Reference() {
24         super();
25 }
26 public abstract FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound);
27
28 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
29         return flowInfo;
30 }
31 public FieldBinding fieldBinding() {
32         //this method should be sent one FIELD-tagged references
33         //  (ref.bits & BindingIds.FIELD != 0)()
34         return null ;
35 }
36 //public void fieldStore(CodeStream codeStream, FieldBinding fieldBinding, MethodBinding syntheticWriteAccessor, boolean valueRequired) {
37 //
38 //      if (fieldBinding.isStatic()) {
39 //              if (valueRequired) {
40 //                      if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
41 //                              codeStream.dup2();
42 //                      } else {
43 //                              codeStream.dup();
44 //                      }
45 //              }
46 //              if (syntheticWriteAccessor == null) {
47 //                      codeStream.putstatic(fieldBinding);
48 //              } else {
49 //                      codeStream.invokestatic(syntheticWriteAccessor);
50 //              }
51 //      } else { // Stack:  [owner][new field value]  ---> [new field value][owner][new field value]
52 //              if (valueRequired) {
53 //                      if ((fieldBinding.type == LongBinding) || (fieldBinding.type == DoubleBinding)) {
54 //                              codeStream.dup2_x1();
55 //                      } else {
56 //                              codeStream.dup_x1();
57 //                      }
58 //              }
59 //              if (syntheticWriteAccessor == null) {
60 //                      codeStream.putfield(fieldBinding);
61 //              } else {
62 //                      codeStream.invokestatic(syntheticWriteAccessor);
63 //              }
64 //      }
65 //}
66 //public abstract void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired);
67 //
68 //public abstract void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired);
69 //
70 //public abstract void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired);
71
72 }