/** Check if current node in input has a context. Context means sequence * of nodes towards root of tree. For example, you might say context * is "MULT" which means my parent must be MULT. "CLASS VARDEF" says * current node must be child of a VARDEF and whose parent is a CLASS node. * You can use "..." to mean zero-or-more nodes. "METHOD ... VARDEF" * means my parent is VARDEF and somewhere above that is a METHOD node. * The first node in the context is not necessarily the root. The context * matcher stops matching and returns true when it runs out of context. * There is no way to force the first node to be the root. */ public boolean inContext(String context) { return inContext(input.getTreeAdaptor(), getTokenNames(), input.LT(1), context); }
/** Check if current node in input has a context. Context means sequence * of nodes towards root of tree. For example, you might say context * is "MULT" which means my parent must be MULT. "CLASS VARDEF" says * current node must be child of a VARDEF and whose parent is a CLASS node. * You can use "..." to mean zero-or-more nodes. "METHOD ... VARDEF" * means my parent is VARDEF and somewhere above that is a METHOD node. * The first node in the context is not necessarily the root. The context * matcher stops matching and returns true when it runs out of context. * There is no way to force the first node to be the root. */ public boolean inContext(String context) { return inContext(input.getTreeAdaptor(), getTokenNames(), input.LT(1), context); }
/** Check if current node in input has a context. Context means sequence * of nodes towards root of tree. For example, you might say context * is "MULT" which means my parent must be MULT. "CLASS VARDEF" says * current node must be child of a VARDEF and whose parent is a CLASS node. * You can use "..." to mean zero-or-more nodes. "METHOD ... VARDEF" * means my parent is VARDEF and somewhere above that is a METHOD node. * The first node in the context is not necessarily the root. The context * matcher stops matching and returns true when it runs out of context. * There is no way to force the first node to be the root. */ public boolean inContext(String context) { return inContext(input.getTreeAdaptor(), getTokenNames(), input.LT(1), context); }
/** Check if current node in input has a context. Context means sequence * of nodes towards root of tree. For example, you might say context * is "MULT" which means my parent must be MULT. "CLASS VARDEF" says * current node must be child of a VARDEF and whose parent is a CLASS node. * You can use "..." to mean zero-or-more nodes. "METHOD ... VARDEF" * means my parent is VARDEF and somewhere above that is a METHOD node. * The first node in the context is not necessarily the root. The context * matcher stops matching and returns true when it runs out of context. * There is no way to force the first node to be the root. */ public boolean inContext(String context) { return inContext(input.getTreeAdaptor(), getTokenNames(), input.LT(1), context); }
/** Check if current node in input has a context. Context means sequence * of nodes towards root of tree. For example, you might say context * is "MULT" which means my parent must be MULT. "CLASS VARDEF" says * current node must be child of a VARDEF and whose parent is a CLASS node. * You can use "..." to mean zero-or-more nodes. "METHOD ... VARDEF" * means my parent is VARDEF and somewhere above that is a METHOD node. * The first node in the context is not necessarily the root. The context * matcher stops matching and returns true when it runs out of context. * There is no way to force the first node to be the root. */ public boolean inContext(String context) { return inContext(input.getTreeAdaptor(), getTokenNames(), input.LT(1), context); }