• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1org.antlr.runtime.MissingTokenException = function(expecting, input, inserted) {
2    if (arguments.length>0) {
3        org.antlr.runtime.MissingTokenException.superclass.constructor.call(
4                this, expecting, input);
5        this.inserted = inserted;
6    }
7};
8
9org.antlr.lang.extend(
10    org.antlr.runtime.MissingTokenException,
11    org.antlr.runtime.MismatchedTokenException, {
12    getMissingType: function() {
13        return this.expecting;
14    },
15
16    toString: function() {
17        if (org.antlr.lang.isValue(this.inserted) &&
18            org.antlr.lang.isValue(this.token))
19        {
20            return "MissingTokenException(inserted "+this.inserted+" at "+this.token.getText()+")";
21        }
22        if ( org.antlr.lang.isValue(this.token) ) {
23            return "MissingTokenException(at "+this.token.getText()+")";
24        }
25        return "MissingTokenException";
26    },
27    name: "org.antlr.runtime.MissingTokenException"
28});
29