1 22 23 package org.javacc.jjtree; 24 25 26 public class ASTOptionBinding extends SimpleNode { 27 ASTOptionBinding(int id) { 28 super(id); 29 } 30 31 private boolean suppressed = false; 32 private String name; 33 34 void initialize(String n, String v) 35 { 36 name = n; 37 if (JJTreeGlobals.jjtreeOptions.get(name.toUpperCase()) != null) { 38 suppressed = !name.toUpperCase().equals("JDK_VERSION"); 39 } 40 } 41 42 43 boolean isSuppressed() 44 { 45 return suppressed; 46 } 47 48 void suppressOption(boolean s) 49 { 50 suppressed = s; 51 } 52 53 54 String translateImage(Token t) 55 { 56 if (suppressed) { 57 return whiteOut(t); 58 } else { 59 return t.image; 60 } 61 } 62 } 63 64 65 66 | Popular Tags |