1 | /*!
|
2 | * Copyright 2016 The ANTLR Project. All rights reserved.
|
3 | * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
4 | */
|
5 | import { ParserRuleContext } from "./ParserRuleContext";
|
6 | /**
|
7 | * This class extends {@link ParserRuleContext} by allowing the value of
|
8 | * {@link #getRuleIndex} to be explicitly set for the context.
|
9 | *
|
10 | * {@link ParserRuleContext} does not include field storage for the rule index
|
11 | * since the context classes created by the code generator override the
|
12 | * {@link #getRuleIndex} method to return the correct value for that context.
|
13 | * Since the parser interpreter does not use the context classes generated for a
|
14 | * parser, this class (with slightly more memory overhead per node) is used to
|
15 | * provide equivalent functionality.
|
16 | */
|
17 | export declare class InterpreterRuleContext extends ParserRuleContext {
|
18 | /**
|
19 | * This is the backing field for {@link #getRuleIndex}.
|
20 | */
|
21 | private _ruleIndex;
|
22 | constructor(ruleIndex: number);
|
23 | /**
|
24 | * Constructs a new {with the specified
InterpreterRuleContext} |
25 | * parent, invoking state, and rule index.
|
26 | *
|
27 | * for the current context.
ruleIndex The rule index |
28 | * parent The parent context.
|
29 | * number.
invokingStateNumber The invoking state |
30 | */
|
31 | constructor(ruleIndex: number, parent: ParserRuleContext | undefined, invokingStateNumber: number);
|
32 | get ruleIndex(): number;
|
33 | }
|