@@ -191,68 +191,6 @@ impl<'a> Token<'a> {
191
191
BadUrl ( _) | BadString ( _) | CloseParenthesis | CloseSquareBracket | CloseCurlyBracket
192
192
)
193
193
}
194
-
195
- pub ( crate ) fn description ( & self ) -> String {
196
- match self {
197
- Ident ( name) => format ! ( "A ident token '{}'" , name) ,
198
- AtKeyword ( value) => format ! ( "The value '{}' does not include the `@` marker" , value) ,
199
- Hash ( value) => format ! ( "The value '{}' does not include the `#` marker" , value) ,
200
- IDHash ( value) => format ! (
201
- "The value '{}' does not include the `#` marker, but has a valid ID selector" ,
202
- value
203
- ) ,
204
- QuotedString ( value) => format ! ( "The value '{}' does not include the quotes" , value) ,
205
- UnquotedUrl ( value) => format ! (
206
- "The value '{}' does not include the `url(` `)` markers." ,
207
- value
208
- ) ,
209
- Delim ( character) => format ! ( "'{}'" , character) ,
210
- Number {
211
- has_sign, value, ..
212
- } => {
213
- let sign = if has_sign. clone ( ) { '-' } else { '+' } ;
214
- format ! ( "{}{}" , sign, value. to_string( ) )
215
- }
216
- Percentage {
217
- has_sign,
218
- unit_value,
219
- ..
220
- } => {
221
- let sign = if has_sign. clone ( ) { '-' } else { '+' } ;
222
- format ! ( "{}{}%" , sign, unit_value. to_string( ) )
223
- }
224
- Dimension {
225
- has_sign,
226
- value,
227
- unit,
228
- ..
229
- } => {
230
- let sign = if has_sign. clone ( ) { '-' } else { '+' } ;
231
- format ! ( "{}{} {}" , sign, value. to_string( ) , unit)
232
- }
233
- WhiteSpace ( whitespace) => format ! ( "whitespace: '{}'" , whitespace) ,
234
- Comment ( comment) => format ! ( "The comment: '{}'" , comment) ,
235
- Colon => String :: from ( ":" ) ,
236
- Semicolon => String :: from ( ";" ) ,
237
- Comma => String :: from ( "," ) ,
238
- IncludeMatch => String :: from ( "~=" ) ,
239
- DashMatch => String :: from ( "|=" ) ,
240
- PrefixMatch => String :: from ( "^=" ) ,
241
- SuffixMatch => String :: from ( "$=" ) ,
242
- SubstringMatch => String :: from ( "*=" ) ,
243
- CDO => String :: from ( "<!--" ) ,
244
- CDC => String :: from ( "-->" ) ,
245
- Function ( name) => format ! ( "The value ({}) does not include the `(` marker" , name) ,
246
- ParenthesisBlock => String :: from ( "(" ) ,
247
- SquareBracketBlock => String :: from ( "[" ) ,
248
- CurlyBracketBlock => String :: from ( "{" ) ,
249
- BadUrl ( url) => format ! ( "Bad url: '{}'" , url) ,
250
- BadString ( string) => format ! ( "Bad string: '{}'" , string) ,
251
- CloseParenthesis => "Unclosed parenthesis" . to_owned ( ) ,
252
- CloseSquareBracket => "Unclosed square bracket" . to_owned ( ) ,
253
- CloseCurlyBracket => "Unclosed curly bracket" . to_owned ( ) ,
254
- }
255
- }
256
194
}
257
195
258
196
#[ derive( Clone ) ]
0 commit comments