DefinitelyTyped/types/antlr4/ParserRuleContext.d.ts
Marlon Chatman 877ced9c4b Add Antlr4 Definitions/Types (#27120)
* Add antlr4 definitions/types

* Update the tsconfig.json for the antlr4 types

* Update the tsconfig.json for the antlr4 types. Use files instead of includes.

* Remove antlr4-test.ts to antlr4-tests.ts, for the antlr4 types

* Remove the c-parser.ts, for the antlr4 types. As this is not allowed in the antlr4-test.ts

* Fix antlr4 types test lint failure

* Update the linting and the tslint.json

* Update the tslint.json, for antlr4 types
2018-07-13 12:46:40 -07:00

45 lines
1.1 KiB
TypeScript

import { RuleContext } from './RuleContext';
import { Token } from './Token';
import { ErrorNode, ParseTreeListener } from './tree/Tree';
import { Interval } from './IntervalSet';
import { RecognitionException } from './error/Errors';
export class ParserRuleContext extends RuleContext {
readonly start: Token;
readonly stop: Token;
readonly ruleIndex: number;
readonly exception: RecognitionException;
constructor(parent: any, invokingState: number);
copyFrom(ctx: any): void;
enterRule(listener: ParseTreeListener): void;
exitRule(listener: ParseTreeListener): void;
addChild(child: any): any;
removeLastChild(): void;
addTokenNode(token: Token): Token;
addErrorNode(badToken: Token): ErrorNode;
getChild(i: number, type?: any): any;
getToken(ttype: number, i: number): Token;
getTokens(ttype: number): Token[];
getTypedRuleContext(cxtType: any, i: number): any;
getTypedRuleContexts(cxtType: any): any[];
getChildCount(): number;
getSourceInterval(): Interval;
static readonly EMPTY: ParserRuleContext;
}