aboutsummaryrefslogtreecommitdiff
path: root/src/interpreter.c
blob: 2a09e6d81fbf292e2ca4d6bc58e48865751ceecc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   interpreter.c                                      :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: dkaiser <dkaiser@student.42heilbronn.de    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2024/08/05 13:15:24 by dkaiser           #+#    #+#             */
/*   Updated: 2024/08/05 13:33:16 by dkaiser          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "minishell.h"

static int	eval_pipe(t_pipe *pipe);
static int	eval_cmd(t_cmd *cmd);

int	eval(t_node *node)
{
	if (node->type == PIPE_NODE)
		return (eval_pipe(&node->content.pipe));
	else if (node->type == CMD_NODE)
		return (eval_cmd(&node->content.cmd));
	else
	{
		panic(UNREACHABLE);
		return (-1);
	}
}

static int	eval_pipe(t_pipe *pipe)
{
	return (0);
}

static int	eval_cmd(t_cmd *cmd)
{
	return (0);
}