diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2016-08-28 15:04:37 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2016-08-28 15:04:37 +0200 |
| commit | 58b2762fed21612145a1e21051adf13d55a79d98 (patch) | |
| tree | 568eafdcf9ae0c9e94fe532c248d5ea39575c858 /sysparser | |
| parent | 9b91ede8607ae78572fef7aed01f1afe3a033928 (diff) | |
sysgen: sort resources by name to avoid unnecessary diffs
Diffstat (limited to 'sysparser')
| -rw-r--r-- | sysparser/lexer.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysparser/lexer.go b/sysparser/lexer.go index 50890b154..26a21e57a 100644 --- a/sysparser/lexer.go +++ b/sysparser/lexer.go @@ -38,6 +38,7 @@ type Struct struct { } type Resource struct { + Name string Base string Values []string } @@ -141,7 +142,7 @@ func Parse(in io.Reader) *Description { if _, ok := structs[id]; ok { failf("struct '%v' is redefined as resource", name) } - resources[id] = Resource{base, vals} + resources[id] = Resource{id, base, vals} } else { switch ch := p.Char(); ch { case '(': |
