@@ -7,15 +7,15 @@ use std::slice;
7
7
use std:: vec;
8
8
9
9
10
- #[ deriving( Eq ) ]
10
+ #[ deriving( PartialEq ) ]
11
11
pub struct NumericValue {
12
12
pub representation : String ,
13
13
pub value : f64 ,
14
14
pub int_value : Option < i64 > ,
15
15
}
16
16
17
17
18
- #[ deriving( Eq ) ]
18
+ #[ deriving( PartialEq ) ]
19
19
pub struct SourceLocation {
20
20
pub line : uint , // First line is 1
21
21
pub column : uint , // First character of a line is at column 1
@@ -25,7 +25,7 @@ pub struct SourceLocation {
25
25
pub type Node = ( ComponentValue , SourceLocation ) ; // TODO this is not a good name
26
26
27
27
28
- #[ deriving( Eq ) ]
28
+ #[ deriving( PartialEq ) ]
29
29
pub enum ComponentValue {
30
30
// Preserved tokens.
31
31
Ident ( String ) ,
@@ -69,49 +69,49 @@ pub enum ComponentValue {
69
69
}
70
70
71
71
72
- #[ deriving( Eq ) ]
72
+ #[ deriving( PartialEq ) ]
73
73
pub struct Declaration {
74
74
pub location : SourceLocation ,
75
75
pub name : String ,
76
76
pub value : Vec < ComponentValue > ,
77
77
pub important : bool ,
78
78
}
79
79
80
- #[ deriving( Eq ) ]
80
+ #[ deriving( PartialEq ) ]
81
81
pub struct QualifiedRule {
82
82
pub location : SourceLocation ,
83
83
pub prelude : Vec < ComponentValue > ,
84
84
pub block : Vec < Node > ,
85
85
}
86
86
87
- #[ deriving( Eq ) ]
87
+ #[ deriving( PartialEq ) ]
88
88
pub struct AtRule {
89
89
pub location : SourceLocation ,
90
90
pub name : String ,
91
91
pub prelude : Vec < ComponentValue > ,
92
92
pub block : Option < Vec < Node > > ,
93
93
}
94
94
95
- #[ deriving( Eq ) ]
95
+ #[ deriving( PartialEq ) ]
96
96
pub enum DeclarationListItem {
97
97
Declaration ( Declaration ) ,
98
98
// A better idea for a name that means "at-rule" but is not "AtRule"?
99
99
DeclAtRule ( AtRule ) ,
100
100
}
101
101
102
- #[ deriving( Eq ) ]
102
+ #[ deriving( PartialEq ) ]
103
103
pub enum Rule {
104
104
QualifiedRule ( QualifiedRule ) ,
105
105
AtRule ( AtRule ) ,
106
106
}
107
107
108
- #[ deriving( Eq ) ]
108
+ #[ deriving( PartialEq ) ]
109
109
pub struct SyntaxError {
110
110
pub location : SourceLocation ,
111
111
pub reason : ErrorReason ,
112
112
}
113
113
114
- #[ deriving( Eq ) ]
114
+ #[ deriving( PartialEq ) ]
115
115
pub enum ErrorReason {
116
116
ErrEmptyInput , // Parsing a single "thing", found only whitespace.
117
117
ErrExtraInput , // Found more non-whitespace after parsing a single "thing".
0 commit comments