mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
wordsplit: handle operators
This commit is contained in:
parent
558ddb4096
commit
f92763e479
7 changed files with 200 additions and 15 deletions
26
src/parser/matchers/operator_start.c
Normal file
26
src/parser/matchers/operator_start.c
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* operator_start.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/17 16:21:03 by khais #+# #+# */
|
||||
/* Updated: 2025/02/17 16:22:40 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
/*
|
||||
** Is the character the start of an operator?
|
||||
*/
|
||||
bool is_operator_start(char c)
|
||||
{
|
||||
if (ft_strchr("<>|&()", c) != NULL)
|
||||
return (true);
|
||||
else
|
||||
return (false);
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue