mismatchedtreenodeexception.java

来自「ANTLR(ANother Tool for Language Recognit」· Java 代码 · 共 31 行

JAVA
31
字号
package org.antlr.runtime;import org.antlr.runtime.tree.TreeNodeStream;import org.antlr.runtime.tree.Tree;/** */public class MismatchedTreeNodeException extends RecognitionException {	public int expecting;	public Object foundNode;	public MismatchedTreeNodeException() {	}	public MismatchedTreeNodeException(int expecting, TreeNodeStream input) {		super(input);		if ( input.LT(1) instanceof Tree ) {			Tree t = (Tree)input.LT(1);			line = t.getLine();			charPositionInLine = t.getCharPositionInLine();			// TODO: if DOWN/UP, there is no line info currently		}		this.foundNode = input.LT(1);		this.expecting = expecting;	}	public String toString() {		return "MismatchedTreeNodeException("+getUnexpectedType()+"!="+expecting+")";	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?