01: /* ****************************************************************************
02: * ASTOperator.java
03: * ****************************************************************************/
04:
05: /* J_LZ_COPYRIGHT_BEGIN *******************************************************
06: * Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
07: * Use is subject to license terms. *
08: * J_LZ_COPYRIGHT_END *********************************************************/
09:
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: }
|