| commit | 8854773c56ebf4f318d7dba3d022626259178ec0 | [log] [tgz] |
|---|---|---|
| author | Joel Galenson <jgalenson@google.com> | Tue May 05 08:23:42 2020 -0700 |
| committer | Joel Galenson <jgalenson@google.com> | Tue May 05 08:32:32 2020 -0700 |
| tree | d747f23afc1f44797b0bf28ed6daa9000bbdac47 | |
| parent | de471c9a2202e40be77ff2b5dda28d5c4882c1fe [diff] [blame] |
Compute enum discriminant during parsing This allows us to reuse the computation in multiple places later.
diff --git a/syntax/mod.rs b/syntax/mod.rs index e6c5bb8..fd8db73 100644 --- a/syntax/mod.rs +++ b/syntax/mod.rs
@@ -95,7 +95,7 @@ pub struct Variant { pub ident: Ident, - pub discriminant: Option<u32>, + pub discriminant: u32, } pub enum Type {