aboutsummaryrefslogtreecommitdiff
path: root/antlr-3.4/runtime/JavaScript/src/org/antlr/runtime/MismatchedTokenException.js
diff options
context:
space:
mode:
Diffstat (limited to 'antlr-3.4/runtime/JavaScript/src/org/antlr/runtime/MismatchedTokenException.js')
-rwxr-xr-xantlr-3.4/runtime/JavaScript/src/org/antlr/runtime/MismatchedTokenException.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/antlr-3.4/runtime/JavaScript/src/org/antlr/runtime/MismatchedTokenException.js b/antlr-3.4/runtime/JavaScript/src/org/antlr/runtime/MismatchedTokenException.js
new file mode 100755
index 0000000..0cd1b72
--- /dev/null
+++ b/antlr-3.4/runtime/JavaScript/src/org/antlr/runtime/MismatchedTokenException.js
@@ -0,0 +1,19 @@
+org.antlr.runtime.MismatchedTokenException = function(expecting, input) {
+ if (arguments.length===0) {
+ this.expecting = org.antlr.runtime.Token.INVALID_TOKEN_TYPE;
+ } else {
+ org.antlr.runtime.MismatchedTokenException.superclass.constructor.call(
+ this, input);
+ this.expecting = expecting;
+ }
+};
+
+org.antlr.lang.extend(
+ org.antlr.runtime.MismatchedTokenException,
+ org.antlr.runtime.RecognitionException, {
+ toString: function() {
+ return "MismatchedTokenException(" +
+ this.getUnexpectedType() + "!=" + this.expecting + ")";
+ },
+ name: "org.antlr.runtime.MismatchedTokenException"
+});