tunnelvisionlabs / antlr4ts

Optimized TypeScript target for ANTLR 4
Other
624 stars 106 forks source link

Grammar r file `exception` rule is conflict with ParserRuleContext.exception #532

Closed alingse closed 2 years ago

alingse commented 2 years ago
export declare class ParserRuleContext extends RuleContext {
    /**
     * The exception that forced this rule to return. If the rule successfully
     * completed, this is `undefined`.
     */
    exception?: RecognitionException;

and

export class DefinitionContext extends ParserRuleContext {
    public exception(): ExceptionContext | undefined {
        return this.tryGetRuleContext(0, ExceptionContext);
    }

the g4 file was here https://github.com/thrift-labs/thrift-parser/blob/master/Thrift.g4

yes, I will edit the .g4 to avoid this.