KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openlaszlo > sc > parser > ASTOperator


1 /* ****************************************************************************
2  * ASTOperator.java
3 * ****************************************************************************/

4
5 /* J_LZ_COPYRIGHT_BEGIN *******************************************************
6 * Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
7 * Use is subject to license terms. *
8 * J_LZ_COPYRIGHT_END *********************************************************/

9
10 package org.openlaszlo.sc.parser;
11
12 public class ASTOperator extends SimpleNode {
13     
14     private int operatorCode = -1;//todo: EOF;
15

16   public ASTOperator(int id) {
17     super(id);
18   }
19
20   public ASTOperator(Parser p, int id) {
21     super(p, id);
22   }
23
24   public static Node jjtCreate(int id) {
25       return new ASTOperator(id);
26   }
27
28   public static Node jjtCreate(Parser p, int id) {
29       return new ASTOperator(p, id);
30   }
31
32   // Added
33
public void setOperator(int operatorCode) {
34       this.operatorCode = operatorCode;
35   }
36
37   public int getOperator() {
38       return operatorCode;
39   }
40   
41     //todo public String toString() {
42
// return "<" + tokenImage[operatorCode] + ">";
43
// }
44

45 }
46
Popular Tags