UNPKG

@amplitude/ampli

Version:

Amplitude CLI

916 lines (915 loc) 990 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IdentifierContext = exports.SimpleIdentifierContext = exports.UnescapedAnnotationContext = exports.AnnotationUseSiteTargetContext = exports.MultiAnnotationContext = exports.SingleAnnotationContext = exports.AnnotationContext = exports.PlatformModifierContext = exports.ReificationModifierContext = exports.ParameterModifierContext = exports.InheritanceModifierContext = exports.PropertyModifierContext = exports.FunctionModifierContext = exports.TypeParameterModifierContext = exports.TypeParameterModifiersContext = exports.VarianceModifierContext = exports.VisibilityModifierContext = exports.MemberModifierContext = exports.ClassModifierContext = exports.TypeModifierContext = exports.TypeModifiersContext = exports.ModifierContext = exports.ParameterModifiersContext = exports.ModifiersContext = exports.SafeNavContext = exports.MemberAccessOperatorContext = exports.ExclContext = exports.PostfixUnaryOperatorContext = exports.PrefixUnaryOperatorContext = exports.AsOperatorContext = exports.MultiplicativeOperatorContext = exports.AdditiveOperatorContext = exports.IsOperatorContext = exports.InOperatorContext = exports.ComparisonOperatorContext = exports.EqualityOperatorContext = exports.AssignmentAndOperatorContext = exports.CallableReferenceContext = exports.JumpExpressionContext = exports.FinallyBlockContext = exports.CatchBlockContext = exports.TryExpressionContext = exports.TypeTestContext = exports.RangeTestContext = exports.WhenConditionContext = exports.WhenEntryContext = exports.WhenExpressionContext = exports.WhenSubjectContext = exports.IfExpressionContext = exports.SuperExpressionContext = exports.ThisExpressionContext = exports.ObjectLiteralContext = exports.FunctionLiteralContext = exports.AnonymousFunctionContext = exports.LambdaParameterContext = exports.LambdaParametersContext = exports.LambdaLiteralContext = exports.MultiLineStringExpressionContext = exports.MultiLineStringContentContext = exports.LineStringExpressionContext = exports.LineStringContentContext = exports.MultiLineStringLiteralContext = exports.LineStringLiteralContext = exports.StringLiteralContext = exports.LiteralConstantContext = exports.CollectionLiteralContext = exports.ParenthesizedExpressionContext = exports.PrimaryExpressionContext = exports.ValueArgumentContext = exports.ValueArgumentsContext = exports.TypeArgumentsContext = exports.AnnotatedLambdaContext = exports.CallSuffixContext = exports.NavigationSuffixContext = exports.IndexingSuffixContext = exports.AssignableSuffixContext = exports.ParenthesizedAssignableExpressionContext = exports.AssignableExpressionContext = exports.ParenthesizedDirectlyAssignableExpressionContext = exports.DirectlyAssignableExpressionContext = exports.PostfixUnarySuffixContext = exports.PostfixUnaryExpressionContext = exports.UnaryPrefixContext = exports.PrefixUnaryExpressionContext = exports.AsExpressionContext = exports.MultiplicativeExpressionContext = exports.AdditiveExpressionContext = exports.RangeExpressionContext = exports.InfixFunctionCallContext = exports.ElvisContext = exports.ElvisExpressionContext = exports.InfixOperationContext = exports.GenericCallLikeComparisonContext = exports.ComparisonContext = exports.EqualityContext = exports.ConjunctionContext = exports.DisjunctionContext = exports.ExpressionContext = exports.SemisContext = exports.SemiContext = exports.AssignmentContext = exports.DoWhileStatementContext = exports.WhileStatementContext = exports.ForStatementContext = exports.LoopStatementContext = exports.BlockContext = exports.ControlStructureBodyContext = exports.LabelContext = exports.StatementContext = exports.StatementsContext = exports.DefinitelyNonNullableTypeContext = exports.ParenthesizedUserTypeContext = exports.ReceiverTypeContext = exports.ParenthesizedTypeContext = exports.FunctionTypeParametersContext = exports.FunctionTypeContext = exports.TypeProjectionModifierContext = exports.TypeProjectionModifiersContext = exports.TypeProjectionContext = exports.SimpleUserTypeContext = exports.UserTypeContext = exports.QuestContext = exports.NullableTypeContext = exports.TypeReferenceContext = exports.TypeContext = exports.EnumEntryContext = exports.EnumEntriesContext = exports.EnumClassBodyContext = exports.ConstructorDelegationCallContext = exports.SecondaryConstructorContext = exports.ObjectDeclarationContext = exports.ParameterContext = exports.ParameterWithOptionalTypeContext = exports.FunctionValueParameterWithOptionalTypeContext = exports.ParametersWithOptionalTypeContext = exports.SetterContext = exports.GetterContext = exports.PropertyDelegateContext = exports.PropertyDeclarationContext = exports.MultiVariableDeclarationContext = exports.VariableDeclarationContext = exports.FunctionBodyContext = exports.FunctionDeclarationContext = exports.FunctionValueParameterContext = exports.FunctionValueParametersContext = exports.CompanionObjectContext = exports.AnonymousInitializerContext = exports.ClassMemberDeclarationContext = exports.ClassMemberDeclarationsContext = exports.TypeConstraintContext = exports.TypeConstraintsContext = exports.TypeParameterContext = exports.TypeParametersContext = exports.ExplicitDelegationContext = exports.AnnotatedDelegationSpecifierContext = exports.ConstructorInvocationContext = exports.DelegationSpecifierContext = exports.DelegationSpecifiersContext = exports.ClassParameterContext = exports.ClassParametersContext = exports.ClassBodyContext = exports.PrimaryConstructorContext = exports.ClassDeclarationContext = exports.DeclarationContext = exports.TypeAliasContext = exports.TopLevelObjectContext = exports.ImportAliasContext = exports.ImportHeaderContext = exports.ImportListContext = exports.PackageHeaderContext = exports.FileAnnotationContext = exports.ShebangLineContext = exports.ScriptContext = exports.KotlinFileContext = exports.KotlinParser = void 0; const ATN_1 = require("antlr4ts/atn/ATN"); const ATNDeserializer_1 = require("antlr4ts/atn/ATNDeserializer"); const FailedPredicateException_1 = require("antlr4ts/FailedPredicateException"); const NoViableAltException_1 = require("antlr4ts/NoViableAltException"); const Parser_1 = require("antlr4ts/Parser"); const ParserRuleContext_1 = require("antlr4ts/ParserRuleContext"); const ParserATNSimulator_1 = require("antlr4ts/atn/ParserATNSimulator"); const RecognitionException_1 = require("antlr4ts/RecognitionException"); const Token_1 = require("antlr4ts/Token"); const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl"); const Utils = require("antlr4ts/misc/Utils"); class KotlinParser extends Parser_1.Parser { constructor(input) { super(input); this._interp = new ParserATNSimulator_1.ParserATNSimulator(KotlinParser._ATN, this); } get vocabulary() { return KotlinParser.VOCABULARY; } get grammarFileName() { return "KotlinParser.g4"; } get ruleNames() { return KotlinParser.ruleNames; } get serializedATN() { return KotlinParser._serializedATN; } createFailedPredicateException(predicate, message) { return new FailedPredicateException_1.FailedPredicateException(this, predicate, message); } kotlinFile() { let _localctx = new KotlinFileContext(this._ctx, this.state); this.enterRule(_localctx, 0, KotlinParser.RULE_kotlinFile); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 349; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === KotlinParser.ShebangLine) { { this.state = 348; this.shebangLine(); } } this.state = 354; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) { { { this.state = 351; this.match(KotlinParser.NL); } } this.state = 356; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 360; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 2, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 357; this.fileAnnotation(); } } } this.state = 362; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 2, this._ctx); } this.state = 363; this.packageHeader(); this.state = 364; this.importList(); this.state = 368; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.AT_NO_WS || _la === KotlinParser.AT_PRE_WS || ((((_la - 73)) & ~0x1F) === 0 && ((1 << (_la - 73)) & ((1 << (KotlinParser.CLASS - 73)) | (1 << (KotlinParser.INTERFACE - 73)) | (1 << (KotlinParser.FUN - 73)) | (1 << (KotlinParser.OBJECT - 73)) | (1 << (KotlinParser.VAL - 73)) | (1 << (KotlinParser.VAR - 73)) | (1 << (KotlinParser.TYPE_ALIAS - 73)))) !== 0) || ((((_la - 108)) & ~0x1F) === 0 && ((1 << (_la - 108)) & ((1 << (KotlinParser.PUBLIC - 108)) | (1 << (KotlinParser.PRIVATE - 108)) | (1 << (KotlinParser.PROTECTED - 108)) | (1 << (KotlinParser.INTERNAL - 108)) | (1 << (KotlinParser.ENUM - 108)) | (1 << (KotlinParser.SEALED - 108)) | (1 << (KotlinParser.ANNOTATION - 108)) | (1 << (KotlinParser.DATA - 108)) | (1 << (KotlinParser.INNER - 108)) | (1 << (KotlinParser.VALUE - 108)) | (1 << (KotlinParser.TAILREC - 108)) | (1 << (KotlinParser.OPERATOR - 108)) | (1 << (KotlinParser.INLINE - 108)) | (1 << (KotlinParser.INFIX - 108)) | (1 << (KotlinParser.EXTERNAL - 108)) | (1 << (KotlinParser.SUSPEND - 108)) | (1 << (KotlinParser.OVERRIDE - 108)) | (1 << (KotlinParser.ABSTRACT - 108)) | (1 << (KotlinParser.FINAL - 108)) | (1 << (KotlinParser.OPEN - 108)) | (1 << (KotlinParser.CONST - 108)) | (1 << (KotlinParser.LATEINIT - 108)) | (1 << (KotlinParser.VARARG - 108)) | (1 << (KotlinParser.NOINLINE - 108)) | (1 << (KotlinParser.CROSSINLINE - 108)) | (1 << (KotlinParser.EXPECT - 108)) | (1 << (KotlinParser.ACTUAL - 108)))) !== 0)) { { { this.state = 365; this.topLevelObject(); } } this.state = 370; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 371; this.match(KotlinParser.EOF); } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } script() { let _localctx = new ScriptContext(this._ctx, this.state); this.enterRule(_localctx, 2, KotlinParser.RULE_script); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 374; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === KotlinParser.ShebangLine) { { this.state = 373; this.shebangLine(); } } this.state = 379; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) { { { this.state = 376; this.match(KotlinParser.NL); } } this.state = 381; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 385; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 382; this.fileAnnotation(); } } } this.state = 387; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); } this.state = 388; this.packageHeader(); this.state = 389; this.importList(); this.state = 395; this._errHandler.sync(this); _la = this._input.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << KotlinParser.LPAREN) | (1 << KotlinParser.LSQUARE) | (1 << KotlinParser.LCURL) | (1 << KotlinParser.ADD) | (1 << KotlinParser.SUB) | (1 << KotlinParser.INCR) | (1 << KotlinParser.DECR) | (1 << KotlinParser.EXCL_WS) | (1 << KotlinParser.EXCL_NO_WS))) !== 0) || ((((_la - 37)) & ~0x1F) === 0 && ((1 << (_la - 37)) & ((1 << (KotlinParser.COLONCOLON - 37)) | (1 << (KotlinParser.AT_NO_WS - 37)) | (1 << (KotlinParser.AT_PRE_WS - 37)) | (1 << (KotlinParser.RETURN_AT - 37)) | (1 << (KotlinParser.CONTINUE_AT - 37)) | (1 << (KotlinParser.BREAK_AT - 37)) | (1 << (KotlinParser.THIS_AT - 37)) | (1 << (KotlinParser.SUPER_AT - 37)) | (1 << (KotlinParser.FILE - 37)) | (1 << (KotlinParser.FIELD - 37)) | (1 << (KotlinParser.PROPERTY - 37)) | (1 << (KotlinParser.GET - 37)) | (1 << (KotlinParser.SET - 37)) | (1 << (KotlinParser.RECEIVER - 37)) | (1 << (KotlinParser.PARAM - 37)))) !== 0) || ((((_la - 69)) & ~0x1F) === 0 && ((1 << (_la - 69)) & ((1 << (KotlinParser.SETPARAM - 69)) | (1 << (KotlinParser.DELEGATE - 69)) | (1 << (KotlinParser.IMPORT - 69)) | (1 << (KotlinParser.CLASS - 69)) | (1 << (KotlinParser.INTERFACE - 69)) | (1 << (KotlinParser.FUN - 69)) | (1 << (KotlinParser.OBJECT - 69)) | (1 << (KotlinParser.VAL - 69)) | (1 << (KotlinParser.VAR - 69)) | (1 << (KotlinParser.TYPE_ALIAS - 69)) | (1 << (KotlinParser.CONSTRUCTOR - 69)) | (1 << (KotlinParser.BY - 69)) | (1 << (KotlinParser.COMPANION - 69)) | (1 << (KotlinParser.INIT - 69)) | (1 << (KotlinParser.THIS - 69)) | (1 << (KotlinParser.SUPER - 69)) | (1 << (KotlinParser.WHERE - 69)) | (1 << (KotlinParser.IF - 69)) | (1 << (KotlinParser.WHEN - 69)) | (1 << (KotlinParser.TRY - 69)) | (1 << (KotlinParser.CATCH - 69)) | (1 << (KotlinParser.FINALLY - 69)) | (1 << (KotlinParser.FOR - 69)) | (1 << (KotlinParser.DO - 69)) | (1 << (KotlinParser.WHILE - 69)) | (1 << (KotlinParser.THROW - 69)) | (1 << (KotlinParser.RETURN - 69)) | (1 << (KotlinParser.CONTINUE - 69)) | (1 << (KotlinParser.BREAK - 69)))) !== 0) || ((((_la - 106)) & ~0x1F) === 0 && ((1 << (_la - 106)) & ((1 << (KotlinParser.OUT - 106)) | (1 << (KotlinParser.DYNAMIC - 106)) | (1 << (KotlinParser.PUBLIC - 106)) | (1 << (KotlinParser.PRIVATE - 106)) | (1 << (KotlinParser.PROTECTED - 106)) | (1 << (KotlinParser.INTERNAL - 106)) | (1 << (KotlinParser.ENUM - 106)) | (1 << (KotlinParser.SEALED - 106)) | (1 << (KotlinParser.ANNOTATION - 106)) | (1 << (KotlinParser.DATA - 106)) | (1 << (KotlinParser.INNER - 106)) | (1 << (KotlinParser.VALUE - 106)) | (1 << (KotlinParser.TAILREC - 106)) | (1 << (KotlinParser.OPERATOR - 106)) | (1 << (KotlinParser.INLINE - 106)) | (1 << (KotlinParser.INFIX - 106)) | (1 << (KotlinParser.EXTERNAL - 106)) | (1 << (KotlinParser.SUSPEND - 106)) | (1 << (KotlinParser.OVERRIDE - 106)) | (1 << (KotlinParser.ABSTRACT - 106)) | (1 << (KotlinParser.FINAL - 106)) | (1 << (KotlinParser.OPEN - 106)) | (1 << (KotlinParser.CONST - 106)) | (1 << (KotlinParser.LATEINIT - 106)) | (1 << (KotlinParser.VARARG - 106)) | (1 << (KotlinParser.NOINLINE - 106)) | (1 << (KotlinParser.CROSSINLINE - 106)) | (1 << (KotlinParser.REIFIED - 106)) | (1 << (KotlinParser.EXPECT - 106)) | (1 << (KotlinParser.ACTUAL - 106)) | (1 << (KotlinParser.RealLiteral - 106)))) !== 0) || ((((_la - 139)) & ~0x1F) === 0 && ((1 << (_la - 139)) & ((1 << (KotlinParser.IntegerLiteral - 139)) | (1 << (KotlinParser.HexLiteral - 139)) | (1 << (KotlinParser.BinLiteral - 139)) | (1 << (KotlinParser.UnsignedLiteral - 139)) | (1 << (KotlinParser.LongLiteral - 139)) | (1 << (KotlinParser.BooleanLiteral - 139)) | (1 << (KotlinParser.NullLiteral - 139)) | (1 << (KotlinParser.CharacterLiteral - 139)) | (1 << (KotlinParser.Identifier - 139)) | (1 << (KotlinParser.QUOTE_OPEN - 139)) | (1 << (KotlinParser.TRIPLE_QUOTE_OPEN - 139)))) !== 0)) { { { this.state = 390; this.statement(); this.state = 391; this.semi(); } } this.state = 397; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 398; this.match(KotlinParser.EOF); } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } shebangLine() { let _localctx = new ShebangLineContext(this._ctx, this.state); this.enterRule(_localctx, 4, KotlinParser.RULE_shebangLine); try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 400; this.match(KotlinParser.ShebangLine); this.state = 402; this._errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { this.state = 401; this.match(KotlinParser.NL); } } break; default: throw new NoViableAltException_1.NoViableAltException(this); } this.state = 404; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 8, this._ctx); } while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER); } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } fileAnnotation() { let _localctx = new FileAnnotationContext(this._ctx, this.state); this.enterRule(_localctx, 6, KotlinParser.RULE_fileAnnotation); let _la; try { this.enterOuterAlt(_localctx, 1); { this.state = 406; _la = this._input.LA(1); if (!(_la === KotlinParser.AT_NO_WS || _la === KotlinParser.AT_PRE_WS)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token_1.Token.EOF) { this.matchedEOF = true; } this._errHandler.reportMatch(this); this.consume(); } this.state = 407; this.match(KotlinParser.FILE); this.state = 411; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) { { { this.state = 408; this.match(KotlinParser.NL); } } this.state = 413; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 414; this.match(KotlinParser.COLON); this.state = 418; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) { { { this.state = 415; this.match(KotlinParser.NL); } } this.state = 420; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 430; this._errHandler.sync(this); switch (this._input.LA(1)) { case KotlinParser.LSQUARE: { this.state = 421; this.match(KotlinParser.LSQUARE); this.state = 423; this._errHandler.sync(this); _la = this._input.LA(1); do { { { this.state = 422; this.unescapedAnnotation(); } } this.state = 425; this._errHandler.sync(this); _la = this._input.LA(1); } while (((((_la - 62)) & ~0x1F) === 0 && ((1 << (_la - 62)) & ((1 << (KotlinParser.FILE - 62)) | (1 << (KotlinParser.FIELD - 62)) | (1 << (KotlinParser.PROPERTY - 62)) | (1 << (KotlinParser.GET - 62)) | (1 << (KotlinParser.SET - 62)) | (1 << (KotlinParser.RECEIVER - 62)) | (1 << (KotlinParser.PARAM - 62)) | (1 << (KotlinParser.SETPARAM - 62)) | (1 << (KotlinParser.DELEGATE - 62)) | (1 << (KotlinParser.IMPORT - 62)) | (1 << (KotlinParser.CONSTRUCTOR - 62)) | (1 << (KotlinParser.BY - 62)) | (1 << (KotlinParser.COMPANION - 62)) | (1 << (KotlinParser.INIT - 62)) | (1 << (KotlinParser.WHERE - 62)) | (1 << (KotlinParser.CATCH - 62)) | (1 << (KotlinParser.FINALLY - 62)))) !== 0) || ((((_la - 106)) & ~0x1F) === 0 && ((1 << (_la - 106)) & ((1 << (KotlinParser.OUT - 106)) | (1 << (KotlinParser.DYNAMIC - 106)) | (1 << (KotlinParser.PUBLIC - 106)) | (1 << (KotlinParser.PRIVATE - 106)) | (1 << (KotlinParser.PROTECTED - 106)) | (1 << (KotlinParser.INTERNAL - 106)) | (1 << (KotlinParser.ENUM - 106)) | (1 << (KotlinParser.SEALED - 106)) | (1 << (KotlinParser.ANNOTATION - 106)) | (1 << (KotlinParser.DATA - 106)) | (1 << (KotlinParser.INNER - 106)) | (1 << (KotlinParser.VALUE - 106)) | (1 << (KotlinParser.TAILREC - 106)) | (1 << (KotlinParser.OPERATOR - 106)) | (1 << (KotlinParser.INLINE - 106)) | (1 << (KotlinParser.INFIX - 106)) | (1 << (KotlinParser.EXTERNAL - 106)) | (1 << (KotlinParser.SUSPEND - 106)) | (1 << (KotlinParser.OVERRIDE - 106)) | (1 << (KotlinParser.ABSTRACT - 106)) | (1 << (KotlinParser.FINAL - 106)) | (1 << (KotlinParser.OPEN - 106)) | (1 << (KotlinParser.CONST - 106)) | (1 << (KotlinParser.LATEINIT - 106)) | (1 << (KotlinParser.VARARG - 106)) | (1 << (KotlinParser.NOINLINE - 106)) | (1 << (KotlinParser.CROSSINLINE - 106)) | (1 << (KotlinParser.REIFIED - 106)) | (1 << (KotlinParser.EXPECT - 106)) | (1 << (KotlinParser.ACTUAL - 106)))) !== 0) || _la === KotlinParser.Identifier); this.state = 427; this.match(KotlinParser.RSQUARE); } break; case KotlinParser.FILE: case KotlinParser.FIELD: case KotlinParser.PROPERTY: case KotlinParser.GET: case KotlinParser.SET: case KotlinParser.RECEIVER: case KotlinParser.PARAM: case KotlinParser.SETPARAM: case KotlinParser.DELEGATE: case KotlinParser.IMPORT: case KotlinParser.CONSTRUCTOR: case KotlinParser.BY: case KotlinParser.COMPANION: case KotlinParser.INIT: case KotlinParser.WHERE: case KotlinParser.CATCH: case KotlinParser.FINALLY: case KotlinParser.OUT: case KotlinParser.DYNAMIC: case KotlinParser.PUBLIC: case KotlinParser.PRIVATE: case KotlinParser.PROTECTED: case KotlinParser.INTERNAL: case KotlinParser.ENUM: case KotlinParser.SEALED: case KotlinParser.ANNOTATION: case KotlinParser.DATA: case KotlinParser.INNER: case KotlinParser.VALUE: case KotlinParser.TAILREC: case KotlinParser.OPERATOR: case KotlinParser.INLINE: case KotlinParser.INFIX: case KotlinParser.EXTERNAL: case KotlinParser.SUSPEND: case KotlinParser.OVERRIDE: case KotlinParser.ABSTRACT: case KotlinParser.FINAL: case KotlinParser.OPEN: case KotlinParser.CONST: case KotlinParser.LATEINIT: case KotlinParser.VARARG: case KotlinParser.NOINLINE: case KotlinParser.CROSSINLINE: case KotlinParser.REIFIED: case KotlinParser.EXPECT: case KotlinParser.ACTUAL: case KotlinParser.Identifier: { this.state = 429; this.unescapedAnnotation(); } break; default: throw new NoViableAltException_1.NoViableAltException(this); } this.state = 435; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) { { { this.state = 432; this.match(KotlinParser.NL); } } this.state = 437; this._errHandler.sync(this); _la = this._input.LA(1); } } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } packageHeader() { let _localctx = new PackageHeaderContext(this._ctx, this.state); this.enterRule(_localctx, 8, KotlinParser.RULE_packageHeader); let _la; try { this.enterOuterAlt(_localctx, 1); { this.state = 443; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === KotlinParser.PACKAGE) { { this.state = 438; this.match(KotlinParser.PACKAGE); this.state = 439; this.identifier(); this.state = 441; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === KotlinParser.NL || _la === KotlinParser.SEMICOLON) { { this.state = 440; this.semi(); } } } } } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } importList() { let _localctx = new ImportListContext(this._ctx, this.state); this.enterRule(_localctx, 10, KotlinParser.RULE_importList); try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 448; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 16, this._ctx); while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { this.state = 445; this.importHeader(); } } } this.state = 450; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 16, this._ctx); } } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } importHeader() { let _localctx = new ImportHeaderContext(this._ctx, this.state); this.enterRule(_localctx, 12, KotlinParser.RULE_importHeader); let _la; try { this.enterOuterAlt(_localctx, 1); { this.state = 451; this.match(KotlinParser.IMPORT); this.state = 452; this.identifier(); this.state = 456; this._errHandler.sync(this); switch (this._input.LA(1)) { case KotlinParser.DOT: { this.state = 453; this.match(KotlinParser.DOT); this.state = 454; this.match(KotlinParser.MULT); } break; case KotlinParser.AS: { this.state = 455; this.importAlias(); } break; case KotlinParser.EOF: case KotlinParser.NL: case KotlinParser.LPAREN: case KotlinParser.LSQUARE: case KotlinParser.LCURL: case KotlinParser.ADD: case KotlinParser.SUB: case KotlinParser.INCR: case KotlinParser.DECR: case KotlinParser.EXCL_WS: case KotlinParser.EXCL_NO_WS: case KotlinParser.SEMICOLON: case KotlinParser.COLONCOLON: case KotlinParser.AT_NO_WS: case KotlinParser.AT_PRE_WS: case KotlinParser.RETURN_AT: case KotlinParser.CONTINUE_AT: case KotlinParser.BREAK_AT: case KotlinParser.THIS_AT: case KotlinParser.SUPER_AT: case KotlinParser.FILE: case KotlinParser.FIELD: case KotlinParser.PROPERTY: case KotlinParser.GET: case KotlinParser.SET: case KotlinParser.RECEIVER: case KotlinParser.PARAM: case KotlinParser.SETPARAM: case KotlinParser.DELEGATE: case KotlinParser.IMPORT: case KotlinParser.CLASS: case KotlinParser.INTERFACE: case KotlinParser.FUN: case KotlinParser.OBJECT: case KotlinParser.VAL: case KotlinParser.VAR: case KotlinParser.TYPE_ALIAS: case KotlinParser.CONSTRUCTOR: case KotlinParser.BY: case KotlinParser.COMPANION: case KotlinParser.INIT: case KotlinParser.THIS: case KotlinParser.SUPER: case KotlinParser.WHERE: case KotlinParser.IF: case KotlinParser.WHEN: case KotlinParser.TRY: case KotlinParser.CATCH: case KotlinParser.FINALLY: case KotlinParser.FOR: case KotlinParser.DO: case KotlinParser.WHILE: case KotlinParser.THROW: case KotlinParser.RETURN: case KotlinParser.CONTINUE: case KotlinParser.BREAK: case KotlinParser.OUT: case KotlinParser.DYNAMIC: case KotlinParser.PUBLIC: case KotlinParser.PRIVATE: case KotlinParser.PROTECTED: case KotlinParser.INTERNAL: case KotlinParser.ENUM: case KotlinParser.SEALED: case KotlinParser.ANNOTATION: case KotlinParser.DATA: case KotlinParser.INNER: case KotlinParser.VALUE: case KotlinParser.TAILREC: case KotlinParser.OPERATOR: case KotlinParser.INLINE: case KotlinParser.INFIX: case KotlinParser.EXTERNAL: case KotlinParser.SUSPEND: case KotlinParser.OVERRIDE: case KotlinParser.ABSTRACT: case KotlinParser.FINAL: case KotlinParser.OPEN: case KotlinParser.CONST: case KotlinParser.LATEINIT: case KotlinParser.VARARG: case KotlinParser.NOINLINE: case KotlinParser.CROSSINLINE: case KotlinParser.REIFIED: case KotlinParser.EXPECT: case KotlinParser.ACTUAL: case KotlinParser.RealLiteral: case KotlinParser.IntegerLiteral: case KotlinParser.HexLiteral: case KotlinParser.BinLiteral: case KotlinParser.UnsignedLiteral: case KotlinParser.LongLiteral: case KotlinParser.BooleanLiteral: case KotlinParser.NullLiteral: case KotlinParser.CharacterLiteral: case KotlinParser.Identifier: case KotlinParser.QUOTE_OPEN: case KotlinParser.TRIPLE_QUOTE_OPEN: break; default: break; } this.state = 459; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === KotlinParser.NL || _la === KotlinParser.SEMICOLON) { { this.state = 458; this.semi(); } } } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } importAlias() { let _localctx = new ImportAliasContext(this._ctx, this.state); this.enterRule(_localctx, 14, KotlinParser.RULE_importAlias); try { this.enterOuterAlt(_localctx, 1); { this.state = 461; this.match(KotlinParser.AS); this.state = 462; this.simpleIdentifier(); } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } topLevelObject() { let _localctx = new TopLevelObjectContext(this._ctx, this.state); this.enterRule(_localctx, 16, KotlinParser.RULE_topLevelObject); let _la; try { this.enterOuterAlt(_localctx, 1); { this.state = 464; this.declaration(); this.state = 466; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === KotlinParser.NL || _la === KotlinParser.SEMICOLON) { { this.state = 465; this.semis(); } } } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } typeAlias() { let _localctx = new TypeAliasContext(this._ctx, this.state); this.enterRule(_localctx, 18, KotlinParser.RULE_typeAlias); let _la; try { this.enterOuterAlt(_localctx, 1); { this.state = 469; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === KotlinParser.AT_NO_WS || _la === KotlinParser.AT_PRE_WS || ((((_la - 108)) & ~0x1F) === 0 && ((1 << (_la - 108)) & ((1 << (KotlinParser.PUBLIC - 108)) | (1 << (KotlinParser.PRIVATE - 108)) | (1 << (KotlinParser.PROTECTED - 108)) | (1 << (KotlinParser.INTERNAL - 108)) | (1 << (KotlinParser.ENUM - 108)) | (1 << (KotlinParser.SEALED - 108)) | (1 << (KotlinParser.ANNOTATION - 108)) | (1 << (KotlinParser.DATA - 108)) | (1 << (KotlinParser.INNER - 108)) | (1 << (KotlinParser.VALUE - 108)) | (1 << (KotlinParser.TAILREC - 108)) | (1 << (KotlinParser.OPERATOR - 108)) | (1 << (KotlinParser.INLINE - 108)) | (1 << (KotlinParser.INFIX - 108)) | (1 << (KotlinParser.EXTERNAL - 108)) | (1 << (KotlinParser.SUSPEND - 108)) | (1 << (KotlinParser.OVERRIDE - 108)) | (1 << (KotlinParser.ABSTRACT - 108)) | (1 << (KotlinParser.FINAL - 108)) | (1 << (KotlinParser.OPEN - 108)) | (1 << (KotlinParser.CONST - 108)) | (1 << (KotlinParser.LATEINIT - 108)) | (1 << (KotlinParser.VARARG - 108)) | (1 << (KotlinParser.NOINLINE - 108)) | (1 << (KotlinParser.CROSSINLINE - 108)) | (1 << (KotlinParser.EXPECT - 108)) | (1 << (KotlinParser.ACTUAL - 108)))) !== 0)) { { this.state = 468; this.modifiers(); } } this.state = 471; this.match(KotlinParser.TYPE_ALIAS); this.state = 475; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) { { { this.state = 472; this.match(KotlinParser.NL); } } this.state = 477; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 478; this.simpleIdentifier(); this.state = 486; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 23, this._ctx)) { case 1: { this.state = 482; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) { { { this.state = 479; this.match(KotlinParser.NL); } } this.state = 484; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 485; this.typeParameters(); } break; } this.state = 491; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) { { { this.state = 488; this.match(KotlinParser.NL); } } this.state = 493; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 494; this.match(KotlinParser.ASSIGNMENT); this.state = 498; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) { { { this.state = 495; this.match(KotlinParser.NL); } } this.state = 500; this._errHandler.sync(this); _la = this._input.LA(1); } this.state = 501; this.type(); } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } declaration() { let _localctx = new DeclarationContext(this._ctx, this.state); this.enterRule(_localctx, 20, KotlinParser.RULE_declaration); try { this.state = 508; this._errHandler.sync(this); switch (this.interpreter.adaptivePredict(this._input, 26, this._ctx)) { case 1: this.enterOuterAlt(_localctx, 1); { this.state = 503; this.classDeclaration(); } break; case 2: this.enterOuterAlt(_localctx, 2); { this.state = 504; this.objectDeclaration(); } break; case 3: this.enterOuterAlt(_localctx, 3); { this.state = 505; this.functionDeclaration(); } break; case 4: this.enterOuterAlt(_localctx, 4); { this.state = 506; this.propertyDeclaration(); } break; case 5: this.enterOuterAlt(_localctx, 5); { this.state = 507; this.typeAlias(); } break; } } catch (re) { if (re instanceof RecognitionException_1.RecognitionException) { _localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return _localctx; } classDeclaration() { let _localctx = new ClassDeclarationContext(this._ctx, this.state); this.enterRule(_localctx, 22, KotlinParser.RULE_classDeclaration); let _la; try { let _alt; this.enterOuterAlt(_localctx, 1); { this.state = 511; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === KotlinParser.AT_NO_WS || _la === KotlinParser.AT_PRE_WS || ((((_la - 108)) & ~0x1F) === 0 && ((1 << (_la - 108)) & ((1 << (KotlinParser.PUBLIC - 108)) | (1 << (KotlinParser.PRIVATE - 108)) | (1 << (KotlinParser.PROTECTED - 108)) | (1 << (KotlinParser.INTERNAL - 108)) | (1 << (KotlinParser.ENUM - 108)) | (1 << (KotlinParser.SEALED - 108)) | (1 << (KotlinParser.ANNOTATION - 108)) | (1 << (KotlinParser.DATA - 108)) | (1 << (KotlinParser.INNER - 108)) | (1 << (KotlinParser.VALUE - 108)) | (1 << (KotlinParser.TAILREC - 108)) | (1 << (KotlinParser.OPERATOR - 108)) | (1 << (KotlinParser.INLINE - 108)) | (1 << (KotlinParser.INFIX - 108)) | (1 << (KotlinParser.EXTERNAL - 108)) | (1 << (KotlinParser.SUSPEND - 108)) | (1 << (KotlinParser.OVERRIDE - 108)) | (1 << (KotlinParser.ABSTRACT - 108)) | (1 << (KotlinParser.FINAL - 108)) | (1 << (KotlinParser.OPEN - 108)) | (1 << (KotlinParser.CONST - 108)) | (1 << (KotlinParser.LATEINIT - 108)) | (1 << (KotlinParser.VARARG - 108)) | (1 << (KotlinParser.NOINLINE - 108)) | (1 << (KotlinParser.CROSSINLINE - 108)) | (1 << (KotlinParser.EXPECT - 108)) | (1 << (KotlinParser.ACTUAL - 108)))) !== 0)) { { this.state = 510; this.modifiers(); } } this.state = 524; this._errHandler.sync(this); switch (this._input.LA(1)) { case KotlinParser.CLASS: { this.state = 513; this.match(KotlinParser.CLASS); } break; case KotlinParser.INTERFACE: case KotlinParser.FUN: { this.state = 521; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === KotlinParser.FUN) { { this.state = 514; this.match(KotlinParser.FUN); this.state = 518; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === KotlinParser.NL) {