1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
7 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
8 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
9 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
10 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
11 | };
|
12 | Object.defineProperty(exports, "__esModule", { value: true });
|
13 | exports.NoViableAltException = void 0;
|
14 | const Parser_1 = require("./Parser");
|
15 | const RecognitionException_1 = require("./RecognitionException");
|
16 | const Decorators_1 = require("./Decorators");
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | class NoViableAltException extends RecognitionException_1.RecognitionException {
|
23 | constructor(recognizer, input, startToken, offendingToken, deadEndConfigs, ctx) {
|
24 | if (recognizer instanceof Parser_1.Parser) {
|
25 | if (input === undefined) {
|
26 | input = recognizer.inputStream;
|
27 | }
|
28 | if (startToken === undefined) {
|
29 | startToken = recognizer.currentToken;
|
30 | }
|
31 | if (offendingToken === undefined) {
|
32 | offendingToken = recognizer.currentToken;
|
33 | }
|
34 | if (ctx === undefined) {
|
35 | ctx = recognizer.context;
|
36 | }
|
37 | }
|
38 | super(recognizer, input, ctx);
|
39 | this._deadEndConfigs = deadEndConfigs;
|
40 | this._startToken = startToken;
|
41 | this.setOffendingToken(recognizer, offendingToken);
|
42 | }
|
43 | get startToken() {
|
44 | return this._startToken;
|
45 | }
|
46 | get deadEndConfigs() {
|
47 | return this._deadEndConfigs;
|
48 | }
|
49 | }
|
50 | __decorate([
|
51 | Decorators_1.NotNull
|
52 | ], NoViableAltException.prototype, "_startToken", void 0);
|
53 | exports.NoViableAltException = NoViableAltException;
|
54 |
|
\ | No newline at end of file |