refactor(css/ast): Use names from specification for ast types (#2643)

swc_css_ast:
 - Rename `AttrSelectorOp` to `AttrSelectorMatcher`.
This commit is contained in:
Alexander Akait 2021-11-05 14:42:51 +03:00 committed by GitHub
parent 994c9655c8
commit 20f4e2148c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
101 changed files with 3164 additions and 2865 deletions

View File

@ -70,25 +70,8 @@ pub enum SubclassSelector {
At(AtSelector),
}
#[ast_node("AttributeSelector")]
pub struct AttrSelector {
pub span: Span,
pub name: NamespacedName,
pub op: Option<AttrSelectorOp>,
pub value: Option<Str>,
pub modifier: Option<char>,
}
#[ast_node("PseudoSelector")]
pub struct PseudoSelector {
pub span: Span,
pub is_element: bool,
pub name: Text,
pub args: Tokens,
}
#[derive(StringEnum, Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash, EqIgnoreSpan)]
pub enum AttrSelectorOp {
pub enum AttrSelectorMatcher {
/// `=`
Equals,
@ -108,6 +91,34 @@ pub enum AttrSelectorOp {
Asterisk,
}
#[ast_node]
#[derive(Is)]
pub enum AttrSelectorValue {
#[tag("String")]
Str(Str),
#[tag("Text")]
Text(Text),
}
#[ast_node("AttributeSelector")]
pub struct AttrSelector {
pub span: Span,
pub prefix: Option<Text>,
pub name: Text,
pub matcher: Option<AttrSelectorMatcher>,
pub value: Option<AttrSelectorValue>,
pub modifier: Option<char>,
}
#[ast_node("PseudoSelector")]
pub struct PseudoSelector {
pub span: Span,
pub is_element: bool,
pub name: Text,
pub args: Tokens,
}
/// `*`
#[ast_node]
pub struct UniversalSelector {

View File

@ -744,20 +744,34 @@ where
emit!(&mut *self.with_ctx(ctx), n.text);
}
#[emitter]
fn emit_attr_selector_value(&mut self, n: &AttrSelectorValue) -> Result {
match n {
AttrSelectorValue::Str(n) => emit!(self, n),
AttrSelectorValue::Text(n) => emit!(self, n),
}
}
#[emitter]
fn emit_attr_selector(&mut self, n: &AttrSelector) -> Result {
punct!(self, "[");
if let Some(prefix) = &n.prefix {
emit!(self, prefix);
punct!(self, "|");
}
emit!(self, n.name);
if let Some(op) = n.op {
self.wr.write_punct(None, op.as_str())?;
if let Some(matcher) = n.matcher {
self.wr.write_punct(None, matcher.as_str())?;
}
emit!(self, n.value);
if let Some(m) = &n.modifier {
space!(self);
self.wr.write_raw_char(None, *m)?;
}

View File

@ -39,10 +39,10 @@ impl Error {
ErrorKind::InvalidCharsetAtRule => "Invalid @charset at-rule".into(),
ErrorKind::InvalidTypeSelector => "Invalid type selector".into(),
ErrorKind::InvalidSelector => "Invalid selector".into(),
ErrorKind::InvalidAttrName => "Invalid attribute name".into(),
ErrorKind::ExpectedIdentOrStrForAttrSelectorOp => {
"Expected an identifier or a string after an attribute selector operator".into()
}
ErrorKind::InvalidAttrSelectorName => "Invalid attribute name".into(),
ErrorKind::InvalidAttrSelectorMatcher => "Invalid attribute matcher".into(),
ErrorKind::InvalidAttrSelectorMatcherValue => "Invalid attribute matcher value".into(),
ErrorKind::InvalidAttrSelectorModifier => "Invalid attribute modifier".into(),
ErrorKind::ExpectedNumber => "Expected a number".into(),
ErrorKind::InvalidSupportQuery => "Invalid support query".into(),
ErrorKind::InvalidKeyframeSelector => "Invalid keyframe selector".into(),
@ -71,9 +71,11 @@ pub enum ErrorKind {
InvalidCharsetAtRule,
InvalidTypeSelector,
InvalidSelector,
InvalidAttrName,
InvalidDeclarationValue,
ExpectedIdentOrStrForAttrSelectorOp,
InvalidAttrSelectorName,
InvalidAttrSelectorMatcher,
InvalidAttrSelectorMatcherValue,
InvalidAttrSelectorModifier,
ExpectedNumber,
InvalidSupportQuery,
InvalidKeyframeSelector,

View File

@ -12,6 +12,14 @@ macro_rules! tok {
swc_css_ast::Token::Function { .. }
};
("[") => {
swc_css_ast::Token::LBracket
};
("]") => {
swc_css_ast::Token::RBracket
};
("(") => {
swc_css_ast::Token::LParen
};

View File

@ -266,9 +266,11 @@ where
self.input.skip_ws()?;
let start_span = self.input.cur_span()?;
let name_start_pos = self.input.cur_span()?.lo;
let prefix;
let name;
let mut attr_matcher = None;
let mut matcher_value = None;
let mut matcher_modifier = None;
if let Ok((p, Some(n))) = self.parse_wq_name(start_span) {
prefix = p;
@ -276,79 +278,104 @@ where
} else {
return Err(Error::new(
span!(self, start_pos),
ErrorKind::InvalidAttrName,
ErrorKind::InvalidAttrSelectorName,
));
}
// TODO: we don't need it
let name = NamespacedName {
span: span!(self, name_start_pos),
prefix,
name,
};
self.input.skip_ws()?;
let attr_op = if eat!(self, "=") {
Some(AttrSelectorOp::Equals)
} else {
match cur!(self) {
if !is!(self, "]") {
let span = self.input.cur_span()?;
attr_matcher = match cur!(self) {
tok!("~") | tok!("|") | tok!("^") | tok!("$") | tok!("*") => {
let tok = bump!(self);
expect!(self, "=");
Some(match tok {
tok!("~") => AttrSelectorOp::Tilde,
tok!("|") => AttrSelectorOp::Bar,
tok!("^") => AttrSelectorOp::Caret,
tok!("$") => AttrSelectorOp::Dollar,
tok!("*") => AttrSelectorOp::Asterisk,
tok!("~") => AttrSelectorMatcher::Tilde,
tok!("|") => AttrSelectorMatcher::Bar,
tok!("^") => AttrSelectorMatcher::Caret,
tok!("$") => AttrSelectorMatcher::Dollar,
tok!("*") => AttrSelectorMatcher::Asterisk,
_ => {
unreachable!()
}
})
}
_ => None,
}
};
tok!("=") => {
let tok = bump!(self);
let mut matcher_value = None;
let mut matcher_modifier = None;
Some(match tok {
tok!("=") => AttrSelectorMatcher::Equals,
_ => {
unreachable!()
}
})
}
_ => Err(Error::new(span, ErrorKind::InvalidAttrSelectorMatcher))?,
};
if let Some(..) = attr_op {
self.input.skip_ws()?;
if !is!(self, Str) && !is!(self, Ident) {
return Err(Error::new(
span!(self, start_pos),
ErrorKind::ExpectedIdentOrStrForAttrSelectorOp,
));
}
let span = self.input.cur_span()?;
let _ = cur!(self);
matcher_value = match cur!(self) {
Token::Ident { .. } => {
let value = bump!(self);
let ident = match value {
Token::Ident { value, raw } => (value, raw),
_ => unreachable!(),
};
matcher_value = Some(self.parse_id_or_str_for_attr()?);
Some(AttrSelectorValue::Text(Text {
span,
value: ident.0,
raw: ident.1,
}))
}
Token::Str { .. } => {
let value = bump!(self);
let str = match value {
Token::Str { value, raw } => (value, raw),
_ => unreachable!(),
};
Some(AttrSelectorValue::Str(Str {
span,
value: str.0,
raw: str.1,
}))
}
_ => Err(Error::new(span, ErrorKind::InvalidAttrSelectorMatcherValue))?,
};
self.input.skip_ws()?;
if is!(self, Ident) {
let span = self.input.cur_span()?;
match self.input.cur()? {
Some(Token::Ident { value: s, .. }) => {
if (&**s).eq_ignore_ascii_case("i") || (&**s).eq_ignore_ascii_case("s") {
matcher_modifier = s.chars().next();
bump!(self);
}
Some(Token::Ident { value, .. }) => {
matcher_modifier = value.chars().next();
bump!(self);
}
_ => {}
_ => Err(Error::new(span, ErrorKind::InvalidAttrSelectorModifier))?,
}
}
self.input.skip_ws()?;
}
expect!(self, "]");
Ok(AttrSelector {
span: span!(self, start_pos),
prefix,
name,
op: attr_op,
matcher: attr_matcher,
value: matcher_value,
modifier: matcher_modifier,
})
@ -512,43 +539,6 @@ where
subclass_selectors,
})
}
fn parse_id_or_str_for_attr(&mut self) -> PResult<Str> {
let span = self.input.cur_span()?;
match cur!(self) {
Token::Ident { .. } => {
let value = bump!(self);
let ident = match value {
Token::Ident { value, raw } => (value, raw),
_ => unreachable!(),
};
Ok(Str {
span,
value: ident.0,
raw: ident.1,
})
}
Token::Str { .. } => {
let value = bump!(self);
let str = match value {
Token::Str { value, raw } => (value, raw),
_ => unreachable!(),
};
Ok(Str {
span,
value: str.0,
raw: str.1,
})
}
_ => Err(Error::new(
span,
ErrorKind::ExpectedIdentOrStrForAttrSelectorOp,
))?,
}
}
}
impl<I> Parse<SelectorList> for Parser<I>

View File

@ -1,6 +1,6 @@
error: Expected an identifier or a string after an attribute selector operator
--> $DIR/tests/errors/rome/invalid/selector4/input.css:1:7
error: Invalid attribute matcher value
--> $DIR/tests/errors/rome/invalid/selector4/input.css:1:14
|
1 | .class[attr= {
| ^^^^^^^
| ^

View File

@ -1,4 +1,4 @@
error: Expected "]"
error: Invalid attribute matcher
--> $DIR/tests/errors/rome/invalid/selector6/input.css:1:8
|
1 | a[title%="title"] {

View File

@ -47,35 +47,27 @@
"end": 5,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "*",
"raw": "*"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "*",
"raw": "*"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [*|b]{}
| ^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/-shTP60AAG6a4mCJUpV1cQ/input.css:1:2
|
1 | [*|b]{}
| ^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/-shTP60AAG6a4mCJUpV1cQ/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b="0c"] {}
| ^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/0Zlgi2sdsFfTrdnWOHUqeg/input.css:1:2
|
1 | [b="0c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/0Zlgi2sdsFfTrdnWOHUqeg/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 11,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"value": "attr",
"raw": "attr"
}
"value": "attr",
"raw": "attr"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [attr="-a"] {}
| ^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/54mhLGCwQMwsuiVkiTzAAQ/input.css:1:2
|
1 | [attr="-a"] {}
| ^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/54mhLGCwQMwsuiVkiTzAAQ/input.css:1:2
|

View File

@ -47,28 +47,20 @@
"end": 11,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 8,
"ctxt": 0
},
"value": "attr~",
"raw": "attr\\7e"
}
"value": "attr~",
"raw": "attr\\7e"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"type": "Text",
"span": {
"start": 9,
"end": 10,

View File

@ -46,19 +46,13 @@ error: AttrSelector
1 | [attr\7e=x] {}
| ^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/62BQJI-uDjHXNJ7kyL8HiA/input.css:1:2
|
1 | [attr\7e=x] {}
| ^^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/62BQJI-uDjHXNJ7kyL8HiA/input.css:1:2
|
1 | [attr\7e=x] {}
| ^^^^^^^
error: Str
error: Text
--> $DIR/tests/fixture/esbuild/misc/62BQJI-uDjHXNJ7kyL8HiA/input.css:1:10
|
1 | [attr\7e=x] {}

View File

@ -47,26 +47,18 @@
"end": 10,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "$=",
"matcher": "$=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b $= "c"] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/6IWHWiWjsuGkPiPAp2KmoA/input.css:1:2
|
1 | [b $= "c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/6IWHWiWjsuGkPiPAp2KmoA/input.css:1:2
|

View File

@ -47,35 +47,27 @@
"end": 10,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"value": "*",
"raw": "\\2a"
},
"name": {
"type": "Text",
"span": {
"start": 5,
"end": 9,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"value": "*",
"raw": "\\2a"
},
"name": {
"type": "Text",
"span": {
"start": 5,
"end": 9,
"ctxt": 0
},
"value": "attr",
"raw": "attr"
}
"value": "attr",
"raw": "attr"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [\2a|attr] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/9aSeJQPn4WHMexejaMQQoQ/input.css:1:2
|
1 | [\2a|attr] {}
| ^^^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/9aSeJQPn4WHMexejaMQQoQ/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 7,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b="c"] {}
| ^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/Ae5_auBp274oaSQ0kls9sw/input.css:1:2
|
1 | [b="c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/Ae5_auBp274oaSQ0kls9sw/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 4,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 2,
"end": 3,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 2,
"end": 3,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
"value": "a",
"raw": "a"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | &[a] {}
| ^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/C9nXM9jBTT9WvCQHrwH24Q/input.css:1:3
|
1 | &[a] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/C9nXM9jBTT9WvCQHrwH24Q/input.css:1:3
|

View File

@ -47,26 +47,18 @@
"end": 11,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b = "c" i] {}
| ^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/Drl1Excz8WEwlfIfA2oRQg/input.css:1:2
|
1 | [b = "c" i] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/Drl1Excz8WEwlfIfA2oRQg/input.css:1:2
|

View File

@ -47,35 +47,27 @@
"end": 4,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 1,
"ctxt": 0
},
"value": "",
"raw": ""
},
"name": {
"type": "Text",
"span": {
"start": 2,
"end": 3,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 1,
"ctxt": 0
},
"value": "",
"raw": ""
},
"name": {
"type": "Text",
"span": {
"start": 2,
"end": 3,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [|b]{}
| ^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/DstCRLR-k3tqe3B46li15Q/input.css:1:2
|
1 | [|b]{}
| ^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/DstCRLR-k3tqe3B46li15Q/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"value": ",attr",
"raw": "\\,attr"
}
"value": ",attr",
"raw": "\\,attr"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [\,attr] {}
| ^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/EJ3xE2oHAiQiiAA6TOFfLA/input.css:1:2
|
1 | [\,attr] {}
| ^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/EJ3xE2oHAiQiiAA6TOFfLA/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "*=",
"matcher": "*=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b*="c"] {}
| ^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/GjvJfQVAaNQonYJwt8QRDQ/input.css:1:2
|
1 | [b*="c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/GjvJfQVAaNQonYJwt8QRDQ/input.css:1:2
|

View File

@ -47,35 +47,27 @@
"end": 11,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 3,
"ctxt": 0
},
"value": "ns",
"raw": "ns"
},
"name": {
"type": "Text",
"span": {
"start": 4,
"end": 10,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 3,
"ctxt": 0
},
"value": "ns",
"raw": "ns"
},
"name": {
"type": "Text",
"span": {
"start": 4,
"end": 10,
"ctxt": 0
},
"value": "attr",
"raw": "\\61ttr"
}
"value": "attr",
"raw": "\\61ttr"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [ns|\61ttr] {}
| ^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/HBQJEriDrHgN_kXjKrVW9g/input.css:1:2
|
1 | [ns|\61ttr] {}
| ^^^^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/HBQJEriDrHgN_kXjKrVW9g/input.css:1:2
|

View File

@ -65,26 +65,18 @@
"end": 4,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 2,
"end": 3,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 2,
"end": 3,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -58,12 +58,6 @@ error: AttrSelector
1 | a[b] {}
| ^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/HGH4crVp9Whp_G0PY6BaQA/input.css:1:3
|
1 | a[b] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/HGH4crVp9Whp_G0PY6BaQA/input.css:1:3
|

View File

@ -47,35 +47,27 @@
"end": 12,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 6,
"ctxt": 0
},
"value": ",ns",
"raw": "\\2cns"
},
"name": {
"type": "Text",
"span": {
"start": 7,
"end": 11,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 6,
"ctxt": 0
},
"value": ",ns",
"raw": "\\2cns"
},
"name": {
"type": "Text",
"span": {
"start": 7,
"end": 11,
"ctxt": 0
},
"value": "attr",
"raw": "attr"
}
"value": "attr",
"raw": "attr"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [\2cns|attr] {}
| ^^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/MCJc58-6bYzpgizSxt8jQg/input.css:1:2
|
1 | [\2cns|attr] {}
| ^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/MCJc58-6bYzpgizSxt8jQg/input.css:1:2
|

View File

@ -77,26 +77,18 @@
"end": 5,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -64,12 +64,6 @@ error: AttrSelector
1 | a [b] {}
| ^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/Q42FDvG6_mtoeI7PoHqgQw/input.css:1:4
|
1 | a [b] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/Q42FDvG6_mtoeI7PoHqgQw/input.css:1:4
|

View File

@ -47,26 +47,18 @@
"end": 11,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"value": "attr",
"raw": "attr"
}
"value": "attr",
"raw": "attr"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [attr="--"] {}
| ^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/QLHVnSGDdGN_iDeP3OAXfQ/input.css:1:2
|
1 | [attr="--"] {}
| ^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/QLHVnSGDdGN_iDeP3OAXfQ/input.css:1:2
|

View File

@ -47,35 +47,27 @@
"end": 5,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"raw": "a"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"raw": "a"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [a|b]{}
| ^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/TdBn3uBF54mw96CCUwpgew/input.css:1:2
|
1 | [a|b]{}
| ^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/TdBn3uBF54mw96CCUwpgew/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 10,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "~=",
"matcher": "~=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b ~= "c"] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/U-MOOs2vmQ3m-i8XisYj8w/input.css:1:2
|
1 | [b ~= "c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/U-MOOs2vmQ3m-i8XisYj8w/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "~=",
"matcher": "~=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b~="c"] {}
| ^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/V6ATfoZsbJDwKWSnlREl-w/input.css:1:2
|
1 | [b~="c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/V6ATfoZsbJDwKWSnlREl-w/input.css:1:2
|

View File

@ -47,35 +47,27 @@
"end": 8,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "*",
"raw": "*"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 7,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "*",
"raw": "*"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 7,
"ctxt": 0
},
"value": "attr",
"raw": "attr"
}
"value": "attr",
"raw": "attr"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [*|attr] {}
| ^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/_XB1oeHz4bZ49LCE2cBI6g/input.css:1:2
|
1 | [*|attr] {}
| ^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/_XB1oeHz4bZ49LCE2cBI6g/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 9,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b = "c"] {}
| ^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/_qcmYeHAxw35hMnF2IST8A/input.css:1:2
|
1 | [b = "c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/_qcmYeHAxw35hMnF2IST8A/input.css:1:2
|

View File

@ -65,26 +65,18 @@
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -58,12 +58,6 @@ error: AttrSelector
1 | a/**/[b] {}
| ^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/aEF_NRb2u-g7UzHxaKpOfA/input.css:1:7
|
1 | a/**/[b] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/aEF_NRb2u-g7UzHxaKpOfA/input.css:1:7
|

View File

@ -47,26 +47,18 @@
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "$=",
"matcher": "$=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b$="c"] {}
| ^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/coHEK8Dkb2Zflw3JwafU5Q/input.css:1:2
|
1 | [b$="c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/coHEK8Dkb2Zflw3JwafU5Q/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "^=",
"matcher": "^=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b^="c"] {}
| ^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/cpoL0JfVO7TLrlcAga939A/input.css:1:2
|
1 | [b^="c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/cpoL0JfVO7TLrlcAga939A/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 3,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b] {}
| ^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/dnJiFdC_77rVfPM-yerzTQ/input.css:1:2
|
1 | [b] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/dnJiFdC_77rVfPM-yerzTQ/input.css:1:2
|

View File

@ -47,35 +47,27 @@
"end": 11,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"value": "ns",
"raw": "\\6es"
},
"name": {
"type": "Text",
"span": {
"start": 6,
"end": 10,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"value": "ns",
"raw": "\\6es"
},
"name": {
"type": "Text",
"span": {
"start": 6,
"end": 10,
"ctxt": 0
},
"value": "attr",
"raw": "attr"
}
"value": "attr",
"raw": "attr"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [\6es|attr] {}
| ^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/e_FDMPgmGFzIY3W0EbjxHA/input.css:1:2
|
1 | [\6es|attr] {}
| ^^^^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/e_FDMPgmGFzIY3W0EbjxHA/input.css:1:2
|

View File

@ -47,35 +47,27 @@
"end": 10,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"raw": "a"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"raw": "a"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "|=",
"matcher": "|=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [a|b|="c"]{}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/fYJdtIZOdQKTLI8JJC2b_g/input.css:1:2
|
1 | [a|b|="c"]{}
| ^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/fYJdtIZOdQKTLI8JJC2b_g/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 9,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b="c d"] {}
| ^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/fe2WQQLV9qt16pYQLzZrpw/input.css:1:2
|
1 | [b="c d"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/fe2WQQLV9qt16pYQLzZrpw/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 10,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "*=",
"matcher": "*=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b *= "c"] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/fp9AcaoyGYHGTzXDXcy_ZQ/input.css:1:2
|
1 | [b *= "c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/fp9AcaoyGYHGTzXDXcy_ZQ/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "|=",
"matcher": "|=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b|="c"] {}
| ^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/fxosM7xcuYbDyErN-ODVbw/input.css:1:2
|
1 | [b|="c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/fxosM7xcuYbDyErN-ODVbw/input.css:1:2
|

View File

@ -47,28 +47,20 @@
"end": 10,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"value": "attr",
"raw": "attr"
}
"value": "attr",
"raw": "attr"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"type": "Text",
"span": {
"start": 6,
"end": 9,

View File

@ -46,19 +46,13 @@ error: AttrSelector
1 | [attr=\2c] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/i7oy_7cYzOxuhIPcZo1yow/input.css:1:2
|
1 | [attr=\2c] {}
| ^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/i7oy_7cYzOxuhIPcZo1yow/input.css:1:2
|
1 | [attr=\2c] {}
| ^^^^
error: Str
error: Text
--> $DIR/tests/fixture/esbuild/misc/i7oy_7cYzOxuhIPcZo1yow/input.css:1:7
|
1 | [attr=\2c] {}

View File

@ -47,35 +47,27 @@
"end": 12,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"raw": "a"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"raw": "a"
},
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "|=",
"matcher": "|=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [a|b |= "c"]{}
| ^^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/kubgOdBUY3iT30KfPRcbsA/input.css:1:2
|
1 | [a|b |= "c"]{}
| ^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/kubgOdBUY3iT30KfPRcbsA/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 8,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"value": "attr",
"raw": "\\61ttr"
}
"value": "attr",
"raw": "\\61ttr"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [\61ttr] {}
| ^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/lFIVvsKPgxD4lJlULqKluw/input.css:1:2
|
1 | [\61ttr] {}
| ^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/lFIVvsKPgxD4lJlULqKluw/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 10,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "^=",
"matcher": "^=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b ^= "c"] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/oNUbYW5wdxqAQR8cAY1YBA/input.css:1:2
|
1 | [b ^= "c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/oNUbYW5wdxqAQR8cAY1YBA/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 10,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"value": "attr",
"raw": "attr"
}
"value": "attr",
"raw": "attr"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [attr="-"] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/p4k8Aj2Nw7Pd4QNaHfLCyg/input.css:1:2
|
1 | [attr="-"] {}
| ^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/p4k8Aj2Nw7Pd4QNaHfLCyg/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 11,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b = "c" I] {}
| ^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/pOZgFOB3GdVvQ0hiAsWfpQ/input.css:1:2
|
1 | [b = "c" I] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/pOZgFOB3GdVvQ0hiAsWfpQ/input.css:1:2
|

View File

@ -47,28 +47,20 @@
"end": 9,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"value": "attr",
"raw": "attr"
}
"value": "attr",
"raw": "attr"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"type": "Text",
"span": {
"start": 6,
"end": 8,

View File

@ -46,19 +46,13 @@ error: AttrSelector
1 | [attr=\,] {}
| ^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/pRKMU9FUvZ77y9hGWxYQnw/input.css:1:2
|
1 | [attr=\,] {}
| ^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/pRKMU9FUvZ77y9hGWxYQnw/input.css:1:2
|
1 | [attr=\,] {}
| ^^^^
error: Str
error: Text
--> $DIR/tests/fixture/esbuild/misc/pRKMU9FUvZ77y9hGWxYQnw/input.css:1:7
|
1 | [attr=\,] {}

View File

@ -47,26 +47,18 @@
"end": 10,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": "|=",
"matcher": "|=",
"value": {
"type": "String",
"span": {

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b |= "c"] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/qsC9vwnhYfmqVreVrA1SEg/input.css:1:2
|
1 | [b |= "c"] {}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/qsC9vwnhYfmqVreVrA1SEg/input.css:1:2
|

View File

@ -47,35 +47,27 @@
"end": 13,
"ctxt": 0
},
"name": {
"type": "NamespacedName",
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 3,
"ctxt": 0
},
"value": "ns",
"raw": "ns"
},
"name": {
"type": "Text",
"span": {
"start": 4,
"end": 12,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 1,
"end": 3,
"ctxt": 0
},
"value": "ns",
"raw": "ns"
},
"name": {
"type": "Text",
"span": {
"start": 4,
"end": 12,
"ctxt": 0
},
"value": ",attr",
"raw": "\\2c attr"
}
"value": ",attr",
"raw": "\\2c attr"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [ns|\2c attr] {}
| ^^^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/sEqPCrxONsC0GxTLw0X7IA/input.css:1:2
|
1 | [ns|\2c attr] {}
| ^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/sEqPCrxONsC0GxTLw0X7IA/input.css:1:2
|

View File

@ -47,28 +47,20 @@
"end": 10,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"value": "attr~",
"raw": "attr\\~"
}
"value": "attr~",
"raw": "attr\\~"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"type": "Text",
"span": {
"start": 8,
"end": 9,

View File

@ -46,19 +46,13 @@ error: AttrSelector
1 | [attr\~=x] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/sI7kJsMAHm4ehV5Ec9i9hg/input.css:1:2
|
1 | [attr\~=x] {}
| ^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/sI7kJsMAHm4ehV5Ec9i9hg/input.css:1:2
|
1 | [attr\~=x] {}
| ^^^^^^
error: Str
error: Text
--> $DIR/tests/fixture/esbuild/misc/sI7kJsMAHm4ehV5Ec9i9hg/input.css:1:9
|
1 | [attr\~=x] {}

View File

@ -47,26 +47,18 @@
"end": 10,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 9,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 9,
"ctxt": 0
},
"value": ",attr",
"raw": "\\2c attr"
}
"value": ",attr",
"raw": "\\2c attr"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [\2c attr] {}
| ^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/sNuIucY7tsVtjkcMTIXaGw/input.css:1:2
|
1 | [\2c attr] {}
| ^^^^^^^^
error: Text
--> $DIR/tests/fixture/esbuild/misc/sNuIucY7tsVtjkcMTIXaGw/input.css:1:2
|

View File

@ -47,26 +47,18 @@
"end": 3,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "b",
"raw": "b"
}
"value": "b",
"raw": "b"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}

View File

@ -46,12 +46,6 @@ error: AttrSelector
1 | [b]{}
| ^^^
error: NamespacedName
--> $DIR/tests/fixture/esbuild/misc/vJrDZy-xgYNUTNK3uei3cg/input.css:1:2
|
1 | [b]{}
| ^
error: Text
--> $DIR/tests/fixture/esbuild/misc/vJrDZy-xgYNUTNK3uei3cg/input.css:1:2
|

View File

@ -511,26 +511,18 @@
"end": 96,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 90,
"end": 95,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 90,
"end": 95,
"ctxt": 0
},
"value": "title",
"raw": "title"
}
"value": "title",
"raw": "title"
},
"op": null,
"matcher": null,
"value": null,
"modifier": null
}
@ -641,26 +633,18 @@
"end": 137,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 121,
"end": 126,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 121,
"end": 126,
"ctxt": 0
},
"value": "title",
"raw": "title"
}
"value": "title",
"raw": "title"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {
@ -780,26 +764,18 @@
"end": 179,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 162,
"end": 167,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 162,
"end": 167,
"ctxt": 0
},
"value": "title",
"raw": "title"
}
"value": "title",
"raw": "title"
},
"op": "~=",
"matcher": "~=",
"value": {
"type": "String",
"span": {
@ -919,26 +895,18 @@
"end": 220,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 204,
"end": 209,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 204,
"end": 209,
"ctxt": 0
},
"value": "title",
"raw": "title"
}
"value": "title",
"raw": "title"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {
@ -958,26 +926,18 @@
"end": 239,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 221,
"end": 225,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 221,
"end": 225,
"ctxt": 0
},
"value": "href",
"raw": "href"
}
"value": "href",
"raw": "href"
},
"op": "*=",
"matcher": "*=",
"value": {
"type": "String",
"span": {

View File

@ -407,12 +407,6 @@ error: AttrSelector
13 | a[title] {
| ^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/rome/selectors/input.css:13:3
|
13 | a[title] {
| ^^^^^
error: Text
--> $DIR/tests/fixture/rome/selectors/input.css:13:3
|
@ -510,12 +504,6 @@ error: AttrSelector
17 | a[title = "title"] {
| ^^^^^^^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/rome/selectors/input.css:17:3
|
17 | a[title = "title"] {
| ^^^^^
error: Text
--> $DIR/tests/fixture/rome/selectors/input.css:17:3
|
@ -619,12 +607,6 @@ error: AttrSelector
21 | a[title~="title" i] {
| ^^^^^^^^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/rome/selectors/input.css:21:3
|
21 | a[title~="title" i] {
| ^^^^^
error: Text
--> $DIR/tests/fixture/rome/selectors/input.css:21:3
|
@ -728,12 +710,6 @@ error: AttrSelector
25 | a[title = "title"][href*="image/*" S] {
| ^^^^^^^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/rome/selectors/input.css:25:3
|
25 | a[title = "title"][href*="image/*" S] {
| ^^^^^
error: Text
--> $DIR/tests/fixture/rome/selectors/input.css:25:3
|
@ -758,12 +734,6 @@ error: AttrSelector
25 | a[title = "title"][href*="image/*" S] {
| ^^^^^^^^^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/rome/selectors/input.css:25:20
|
25 | a[title = "title"][href*="image/*" S] {
| ^^^^
error: Text
--> $DIR/tests/fixture/rome/selectors/input.css:25:20
|

View File

@ -1,6 +1,8 @@
[title] {}
[title=foo] {}
[title="foo"] {}
[ title = "foo" ] {}
[ title = "foo" ] {}
[lang~="en-us"] {}
[lang|="zh"] {}
[href^="#"] {}
@ -12,9 +14,16 @@
[href*="cAsE" S] {}
[foo|att=val] {}
[*|att] {}
[ *|att ] {}
[|att] {}
[ |att ] {}
[ |att ] {}
[att] {}
[ att ] {}
[ att ] {}
a[ class = "test" ] {}
a[ class = "test" ] {}
[href*="insensitive" i] {}
[ href ] {}
[ href*="insensitive" i ] {}
[ href *= "insensitive" i ] {}
[ href ] {}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -751,26 +751,18 @@
"end": 917,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 882,
"end": 887,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 882,
"end": 887,
"ctxt": 0
},
"value": "title",
"raw": "title"
}
"value": "title",
"raw": "title"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {
@ -890,26 +882,18 @@
"end": 973,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "NamespacedName",
"type": "Text",
"span": {
"start": 940,
"end": 945,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 940,
"end": 945,
"ctxt": 0
},
"value": "title",
"raw": "title"
}
"value": "title",
"raw": "title"
},
"op": "=",
"matcher": "=",
"value": {
"type": "String",
"span": {

View File

@ -654,12 +654,6 @@ error: AttrSelector
32 | | o very long title"] {
| |___________________^
error: NamespacedName
--> $DIR/tests/fixture/value/quotes/input.css:31:3
|
31 | a[title="a not s\
| ^^^^^
error: Text
--> $DIR/tests/fixture/value/quotes/input.css:31:3
|
@ -765,12 +759,6 @@ error: AttrSelector
35 | a[title="a not so very long title"] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: NamespacedName
--> $DIR/tests/fixture/value/quotes/input.css:35:3
|
35 | a[title="a not so very long title"] {
| ^^^^^
error: Text
--> $DIR/tests/fixture/value/quotes/input.css:35:3
|

Some files were not shown because too many files have changed in this diff Show More