diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-09-30 12:59:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-09-30 15:30:55 +0200 |
commit | d33c85dfbe50039a64595829cdcdf0d641042dc6 (patch) | |
tree | 49cc8609b6fd2874b1eb03f18e7cc8811dcf280f /libbuild2/parser.cxx | |
parent | 6b9699f0f2e48961af25843eea9b694d043bd352 (diff) |
Diagnose `case` and `default` outside `switch`
Diffstat (limited to 'libbuild2/parser.cxx')
-rw-r--r-- | libbuild2/parser.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index a8abbfb..a6a5a83 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -392,7 +392,8 @@ namespace build2 { f = &parser::parse_switch; } - else if (n == "case") + else if (n == "case" || + n == "default") { // Valid ones are handled in parse_switch(). // |