Exemplo n.º 1
0
 def enterDefault_case_block(self,
                             ctx: ConfigParser.Default_case_blockContext):
     Cm.CfgCaseBlockNode.addChoice('default')
     #print('enterDefault_case_block: choice=default, choices=' + str(Cm.CfgCaseBlockNode._currentChoices))
     if ctx.block_statement(
     ):  # if block has statements, these apply to all preceeding choices
         Cm.CfgCaseBlockNode()
Exemplo n.º 2
0
 def enterLabeled_case_block(self,
                             ctx: ConfigParser.Labeled_case_blockContext):
     choiceValName = ctx.id_str().getText()
     Cm.CfgCaseBlockNode.addChoice(choiceValName)
     #print('enterLabeled_case_block: choice=' + choiceValName + ', choices=' + str(Cm.CfgCaseBlockNode._currentChoices))
     if ctx.block_statement(
     ):  # if block has statements, these apply to all preceeding choices
         Cm.CfgCaseBlockNode()