1 package org.antlr.works.debugger.events; 2 32 33 public class DBEventCreateNode extends DBEvent { 34 35 public int id; 36 37 38 public int tokenIndex = -1; 39 40 44 public String text = null; 45 46 public int type; 47 48 public DBEventCreateNode(int id, int tokenIndex) { 49 super(CREATE_NODE); 50 this.id = id; 51 this.tokenIndex = tokenIndex; 52 } 53 54 public DBEventCreateNode(int id, String text, int type) { 55 super(CREATE_NODE); 56 this.id = id; 57 this.text = text; 58 this.type = type; 59 } 60 61 public String toString() { 62 if(tokenIndex != -1) 63 return "Create node "+id+" ("+tokenIndex+")"; 64 else 65 return "Create node "+id+" ("+text+"/"+type+")"; 66 } 67 } 68 | Popular Tags |