Merge pull request #3053 from l215884529/fix-3052

Fix 3052
This commit is contained in:
ericvergnaud 2021-01-27 20:16:38 +08:00 committed by GitHub
commit 62a0b02bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -284,3 +284,4 @@ YYYY/MM/DD, github id, Full name, email
2020/11/26, mr-c, Michael R. Crusoe, 1330696+mr-c@users.noreply.github.com
2020/12/01, maxence-lefebvre, Maxence Lefebvre, maxence-lefebvre@users.noreply.github.com
2020/12/03, electrum, David Phillips, david@acz.org
2021/01/25, l215884529, Qiheng Liu, 13607681+l215884529@users.noreply.github.com

View File

@ -453,7 +453,7 @@ class Parser (Recognizer):
def getInvokingContext(self, ruleIndex:int):
ctx = self._ctx
while ctx is not None:
if ctx.ruleIndex == ruleIndex:
if ctx.getRuleIndex() == ruleIndex:
return ctx
ctx = ctx.parentCtx
return None