diff options
author | Anton Kling <anton@kling.gg> | 2024-10-11 16:43:15 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-10-11 16:43:15 +0200 |
commit | 01281bfbf523a80edad7999bb471104e8f43e2da (patch) | |
tree | 61f6bd56245a16eada86ed2f85b374d5e9215307 /userland/minibox/utilities/sh/ast.c | |
parent | f4a7c749b0f4bfa4c1007e64ca5f8ecb254bbfe1 (diff) |
sh: Add parsing of newlines
Diffstat (limited to 'userland/minibox/utilities/sh/ast.c')
-rw-r--r-- | userland/minibox/utilities/sh/ast.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/userland/minibox/utilities/sh/ast.c b/userland/minibox/utilities/sh/ast.c index 98f4818..2b9c151 100644 --- a/userland/minibox/utilities/sh/ast.c +++ b/userland/minibox/utilities/sh/ast.c @@ -75,6 +75,9 @@ int parse_command(struct TOKEN **token_ptr, struct AST *cur) { exit(1); } } + if (token && TOKEN_NEWLINE == token->type) { + token = token->next; + } *token_ptr = token; return 1; } |