def finish_var_list(lexer, var0): var_list = [StatParser.check_var(lexer, var0)] while lexer.look_ahead() == TokenKind.SEP_COMMA: lexer.get_next_token() exp = ExpParser.parse_prefix_exp(lexer) var_list.append(StatParser.check_var(lexer, exp)) return var_list
def parse_assign_or_func_call_stat(lexer): prefix_exp = ExpParser.parse_prefix_exp(lexer) if isinstance(prefix_exp, lua_exp.FuncCallExp): return lua_stat.FuncCallStat(prefix_exp) else: return StatParser.parse_assign_stat(lexer, prefix_exp)