source: other-projects/rsyntax-textarea/devel-packages/jflex-1.4.3/examples/java/JavaSymbol.java@ 25584

Last change on this file since 25584 was 25584, checked in by davidb, 12 years ago

Initial cut an a text edit area for GLI that supports color syntax highlighting

File size: 744 bytes
Line 
1
2public class JavaSymbol extends java_cup.runtime.Symbol {
3 private int line;
4 private int column;
5
6 public JavaSymbol(int type, int line, int column) {
7 this(type, line, column, -1, -1, null);
8 }
9
10 public JavaSymbol(int type, int line, int column, Object value) {
11 this(type, line, column, -1, -1, value);
12 }
13
14 public JavaSymbol(int type, int line, int column, int left, int right, Object value) {
15 super(type, left, right, value);
16 this.line = line;
17 this.column = column;
18 }
19
20 public int getLine() {
21 return line;
22 }
23
24 public int getColumn() {
25 return column;
26 }
27
28 public String toString() {
29 return "line "+line+", column "+column+", sym: "+sym+(value == null ? "" : (", value: '"+value+"'"));
30 }
31}
Note: See TracBrowser for help on using the repository browser.