From f98bb90a61b6bf98dfe831777482592ea4147976 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 20 Feb 2016 00:44:21 -0500 Subject: Rearrange command() --- diff --git a/parsing/parse.sh b/parsing/parse.sh index da0b07f..444ccc5 100644 --- a/parsing/parse.sh +++ b/parsing/parse.sh @@ -38,6 +38,7 @@ list() fi return 1 } + and_or() { dbg 'and_or()' @@ -51,6 +52,7 @@ and_or() fi return 1 } + pipeline() { dbg 'pipeline()' @@ -78,13 +80,13 @@ pipe_sequence() command() { dbg 'command()' - if compound_command; then + if simple_command; then + return 0 + elif compound_command; then redirect_list return 0 elif function_defn; then return 0 - elif simple_command; then - return 0 fi return 1 } @@ -441,7 +443,7 @@ try() #try 'foo ${#bar#}' #try 'foo ${^}' #try 'foo `bar`' -try 'foo &&' +#try 'foo &&' #try '{ foo; }' #try '( foo )' #try 'for i in 1 2 3; do stuff; done' -- cgit v0.9.1