@@ -7,15 +7,15 @@ use std::slice;
77use std:: vec;
88
99
10- #[ deriving( Eq ) ]
10+ #[ deriving( PartialEq ) ]
1111pub struct NumericValue {
1212 pub representation : String ,
1313 pub value : f64 ,
1414 pub int_value : Option < i64 > ,
1515}
1616
1717
18- #[ deriving( Eq ) ]
18+ #[ deriving( PartialEq ) ]
1919pub struct SourceLocation {
2020 pub line : uint , // First line is 1
2121 pub column : uint , // First character of a line is at column 1
@@ -25,7 +25,7 @@ pub struct SourceLocation {
2525pub type Node = ( ComponentValue , SourceLocation ) ; // TODO this is not a good name
2626
2727
28- #[ deriving( Eq ) ]
28+ #[ deriving( PartialEq ) ]
2929pub enum ComponentValue {
3030 // Preserved tokens.
3131 Ident ( String ) ,
@@ -69,49 +69,49 @@ pub enum ComponentValue {
6969}
7070
7171
72- #[ deriving( Eq ) ]
72+ #[ deriving( PartialEq ) ]
7373pub struct Declaration {
7474 pub location : SourceLocation ,
7575 pub name : String ,
7676 pub value : Vec < ComponentValue > ,
7777 pub important : bool ,
7878}
7979
80- #[ deriving( Eq ) ]
80+ #[ deriving( PartialEq ) ]
8181pub struct QualifiedRule {
8282 pub location : SourceLocation ,
8383 pub prelude : Vec < ComponentValue > ,
8484 pub block : Vec < Node > ,
8585}
8686
87- #[ deriving( Eq ) ]
87+ #[ deriving( PartialEq ) ]
8888pub struct AtRule {
8989 pub location : SourceLocation ,
9090 pub name : String ,
9191 pub prelude : Vec < ComponentValue > ,
9292 pub block : Option < Vec < Node > > ,
9393}
9494
95- #[ deriving( Eq ) ]
95+ #[ deriving( PartialEq ) ]
9696pub enum DeclarationListItem {
9797 Declaration ( Declaration ) ,
9898 // A better idea for a name that means "at-rule" but is not "AtRule"?
9999 DeclAtRule ( AtRule ) ,
100100}
101101
102- #[ deriving( Eq ) ]
102+ #[ deriving( PartialEq ) ]
103103pub enum Rule {
104104 QualifiedRule ( QualifiedRule ) ,
105105 AtRule ( AtRule ) ,
106106}
107107
108- #[ deriving( Eq ) ]
108+ #[ deriving( PartialEq ) ]
109109pub struct SyntaxError {
110110 pub location : SourceLocation ,
111111 pub reason : ErrorReason ,
112112}
113113
114- #[ deriving( Eq ) ]
114+ #[ deriving( PartialEq ) ]
115115pub enum ErrorReason {
116116 ErrEmptyInput , // Parsing a single "thing", found only whitespace.
117117 ErrExtraInput , // Found more non-whitespace after parsing a single "thing".
0 commit comments