static void				do_extract(t_lst *tokens, t_lst *assign_list,
													t_lst *remaining_tokens)
{
	t_token			*token;

	while ((token = twl_lst_first(tokens)))
	{
		if (is_assignment(token->text))
		{
			twl_lst_push_back(assign_list,
									build_assign(twl_lst_pop_front(tokens)));
		}
		else
		{
			break ;
		}
	}
	while ((token = twl_lst_first(tokens)))
	{
		twl_lst_push_back(remaining_tokens, twl_lst_pop_front(tokens));
	}
}
Esempio n. 2
0
gassign *
build_assign (enum tree_code code, gimple *op1, gimple *op2, tree lhs)
{
  return build_assign (code, gimple_assign_lhs (op1), gimple_assign_lhs (op2),
                       lhs);
}
Esempio n. 3
0
gassign *
build_assign (enum tree_code code, gimple *g, int val, tree lhs )
{
  return build_assign (code, gimple_assign_lhs (g), val, lhs);
}