From c7a72567a8474dcecd93215073976b04171d1144 Mon Sep 17 00:00:00 2001 From: jilles Date: Fri, 17 Jun 2011 13:03:49 +0000 Subject: sh: Add case statement fallthrough (with ';&' instead of ';;'). Replacing ;; with the new control operator ;& will cause the next list to be executed as well without checking its pattern, continuing until a list ends with ;; or until the end of the case statement. This is like omitting "break" in a C "switch" statement. The sequence ;& was formerly invalid. This feature is proposed for the next POSIX issue in Austin Group issue #449. --- bin/sh/nodetypes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/sh/nodetypes') diff --git a/bin/sh/nodetypes b/bin/sh/nodetypes index e1e1b04..f705827 100644 --- a/bin/sh/nodetypes +++ b/bin/sh/nodetypes @@ -96,12 +96,13 @@ NCASE ncase # a case statement expr nodeptr # the word to switch on cases nodeptr # the list of cases (NCLIST nodes) -NCLIST nclist # a case +NCLIST nclist # a case ending with ;; type int next nodeptr # the next case in list pattern nodeptr # list of patterns for this case body nodeptr # code to execute for this case +NCLISTFALLTHRU nclist # a case ending with ;& NDEFUN narg # define a function. The "next" field contains # the body of the function. -- cgit v1.1