def p_args_list(self, p): """args_list : args_list ',' arg | arg """ if len(p) == 4: p[0] = AST.ArgsList(p.lineno(1), p[1], p[3]) else: p[0] = AST.ArgsList(p.lineno(1), p[1])
def p_args_list(self, p): """args_list : args_list ',' arg | arg """ if len(p) == 2: p[0] = AST.ArgsList() p[0].add(p[1]) else: p[0] = AST.ArgsList() if p[1] is None else p[1] p[0].add(p[3])
def p_args_list(self, p): """args_list : args_list ',' arg | arg """ if len(p) == 4: if p[1] is None: p[0] = AST.ArgsList() else: p[0] = p[1] p[0].addArg(p[3]) else: p[0] = AST.ArgsList() p[0].addArg(p[1]) p[0].lineno = self.scanner.lexer.lineno
def p_args_list(self, p): """args_list : args_list ',' arg | arg """ if len(p) == 4: p[0] = p[1] p[0].appendArg(p[3]) else: p[0] = AST.ArgsList() p[0].appendArg(p[1])