Example #1
0
 def visitIds(self, ctx: BKITParser.IdsContext):
     if ctx.ids():
         return self.visitIds(ctx.ids()) + [Id(ctx.ID().getText())]
     else:
         if ctx.ID():
             return [Id(ctx.ID().getText())]
         else:
             return []
Example #2
0
 def visitIds(self, ctx: BKITParser.IdsContext):
     if (ctx.getChildCount() == 1):
         # TODO: return list of ids
         # [a ,b ,c ]
         return [Id(ctx.ID().getText())]
     return [Id(ctx.ID().getText())] + ctx.ids().accept(self)
Example #3
0
 def visitIds(self, ctx: BKITParser.IdsContext):
     return list(map(lambda id: Id(id.getText()), ctx.ID()))
Example #4
0
 def visitIds(self, ctx: BKITParser.IdsContext):
     # ID (',' ID)*
     # [Id(a),Id(b)] # [Id(a)]
     return list(map(lambda ID: Id(ID.getText()), ctx.ID()))