帆软使用的第三方框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.3 KiB

package com.fr.third.antlr;
/* ANTLR Translator Generator
* Project led by Terence Parr at http://www.cs.usfca.edu
* Software rights: http://www.antlr.org/license.html
*
* $Id: //depot/code/org.antlr/release/antlr-2.7.7/antlr/CommonASTWithHiddenTokens.java#2 $
*/
import com.fr.third.antlr.collections.AST;
/** A CommonAST whose initialization copies hidden token
* information from the Token used to create a node.
*/
public class CommonASTWithHiddenTokens extends CommonAST {
protected CommonHiddenStreamToken hiddenBefore, hiddenAfter; // references to hidden tokens
public CommonASTWithHiddenTokens() {
super();
}
public CommonASTWithHiddenTokens(Token tok) {
super(tok);
}
public CommonHiddenStreamToken getHiddenAfter() {
return hiddenAfter;
}
public CommonHiddenStreamToken getHiddenBefore() {
return hiddenBefore;
}
public void initialize(AST t)
{
hiddenBefore = ((CommonASTWithHiddenTokens)t).getHiddenBefore();
hiddenAfter = ((CommonASTWithHiddenTokens)t).getHiddenAfter();
super.initialize(t);
}
public void initialize(Token tok) {
CommonHiddenStreamToken t = (CommonHiddenStreamToken)tok;
super.initialize(t);
hiddenBefore = t.getHiddenBefore();
hiddenAfter = t.getHiddenAfter();
}
}