01: package org.codehaus.groovy.syntax;
02:
03: public class TokenMismatchException extends TokenException {
04: private Token unexpectedToken;
05: private int expectedType;
06:
07: public TokenMismatchException(Token token, int expectedType) {
08: super ("Expected token: " + expectedType + " but found: "
09: + token, token);
10: this .unexpectedToken = token;
11: this .expectedType = expectedType;
12: }
13:
14: public Token getUnexpectedToken() {
15: return this .unexpectedToken;
16: }
17:
18: public int getExpectedType() {
19: return this.expectedType;
20: }
21: }
|