Coverage for src/pyensae/languages/CSharpParserBase.py: 36%
14 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-03 02:16 +0200
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-03 02:16 +0200
1from antlr4 import *
4class CSharpParserBase(Parser):
5 def __init__(self, input, output):
6 Parser.__init__(self, input, output)
8 def IsLocalVariableDeclaration(self):
9 # as Test.CSharpParser.Local_variable_declarationContext
10 local_var_decl = self.Context
11 if local_var_decl is None:
12 return True
13 local_variable_type = local_var_decl.local_variable_type()
14 if local_variable_type is None:
15 return True
16 if local_variable_type.GetText() == "var":
17 return False
18 return True