mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
decodetree: Drop check for less than 2 patterns in a group
While it makes little sense for the end product to have a group containing only a single pattern, avoiding this case within an incremental patch set is troublesome. Because this is expected to be a transient condition, do not bother "optimizing" this case, e.g. by folding away the group. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
33c0f25bfd
commit
fe079aa13d
2 changed files with 13 additions and 2 deletions
|
@ -1024,8 +1024,6 @@ def parse_file(f, parent_pat):
|
|||
if name == '}' or name == ']':
|
||||
if len(toks) != 0:
|
||||
error(start_lineno, 'extra tokens after close brace')
|
||||
if len(parent_pat.pats) < 2:
|
||||
error(lineno, 'less than two patterns within braces')
|
||||
|
||||
# Make sure { } and [ ] nest properly.
|
||||
if (name == '}') != isinstance(parent_pat, IncMultiPattern):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue