AST refactoring: merge PatWild and PatWildMulti into one variant with a flag.
This commit is contained in:
parent
b09a02b415
commit
d3202354f5
20 changed files with 42 additions and 36 deletions
|
|
@ -324,9 +324,19 @@ pub enum BindingMode {
|
|||
}
|
||||
|
||||
#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
|
||||
pub enum Pat_ {
|
||||
PatWild,
|
||||
pub enum PatWildKind {
|
||||
/// Represents the wildcard pattern `_`
|
||||
PatWildSingle,
|
||||
|
||||
/// Represents the wildcard pattern `..`
|
||||
PatWildMulti,
|
||||
}
|
||||
|
||||
#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
|
||||
pub enum Pat_ {
|
||||
/// Represents a wildcard pattern (either `_` or `..`)
|
||||
PatWild(PatWildKind),
|
||||
|
||||
/// A PatIdent may either be a new bound variable,
|
||||
/// or a nullary enum (in which case the third field
|
||||
/// is None).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue