refactor(css/ast): Rename types (#2532)

This commit is contained in:
Alexander Akait 2021-10-26 21:38:05 +03:00 committed by GitHub
parent 70f55833e9
commit 0e458778ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
809 changed files with 8731 additions and 3271 deletions

8
Cargo.lock generated
View File

@ -2515,7 +2515,7 @@ dependencies = [
[[package]]
name = "swc_css_ast"
version = "0.21.0"
version = "0.22.0"
dependencies = [
"is-macro",
"serde",
@ -2552,7 +2552,7 @@ dependencies = [
[[package]]
name = "swc_css_parser"
version = "0.23.2"
version = "0.24.0"
dependencies = [
"bitflags",
"lexical",
@ -2568,7 +2568,7 @@ dependencies = [
[[package]]
name = "swc_css_utils"
version = "0.18.0"
version = "0.19.0"
dependencies = [
"swc_atoms 0.2.9",
"swc_common",
@ -2578,7 +2578,7 @@ dependencies = [
[[package]]
name = "swc_css_visit"
version = "0.20.0"
version = "0.21.0"
dependencies = [
"swc_atoms 0.2.9",
"swc_common",

View File

@ -9,8 +9,8 @@ repository = "https://github.com/swc-project/swc.git"
version = "0.24.0"
[dependencies]
swc_css_ast = {version = "0.21.0", path = "./ast"}
swc_css_ast = {version = "0.22.0", path = "./ast"}
swc_css_codegen = {version = "0.22.0", path = "./codegen"}
swc_css_parser = {version = "0.23.0", path = "./parser"}
swc_css_utils = {version = "0.18.0", path = "./utils/"}
swc_css_visit = {version = "0.20.0", path = "./visit"}
swc_css_parser = {version = "0.24.0", path = "./parser"}
swc_css_utils = {version = "0.19.0", path = "./utils/"}
swc_css_visit = {version = "0.21.0", path = "./visit"}

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT"
name = "swc_css_ast"
repository = "https://github.com/swc-project/swc.git"
version = "0.21.0"
version = "0.22.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,4 +1,4 @@
use crate::{AtRule, DeclBlock, PercentValue, Text};
use crate::{AtRule, Block, PercentValue, Text};
use swc_common::{ast_node, Span};
#[ast_node("KeyframesRule")]
@ -25,8 +25,8 @@ pub enum KeyframeSelector {
#[ast_node]
pub enum KeyframeBlockRule {
#[tag("DeclBlock")]
Decl(Box<DeclBlock>),
#[tag("Block")]
Block(Box<Block>),
#[tag("*")]
AtRule(Box<AtRule>),

View File

@ -1,4 +1,4 @@
use crate::{Property, Rule, Text};
use crate::{Declaration, Rule, Text};
use swc_common::{ast_node, Span};
#[ast_node("MediaRule")]
@ -27,8 +27,8 @@ pub enum MediaQuery {
#[tag("OnlyMediaQuery")]
Only(OnlyMediaQuery),
#[tag("Property")]
Property(Property),
#[tag("Declaration")]
Declaration(Declaration),
#[tag("CommaMediaQuery")]
Comma(CommaMediaQuery),

View File

@ -1,5 +1,5 @@
pub use self::{document::*, keyframe::*, media::*, page::*, support::*};
use crate::{DeclBlock, FnValue, Str, Text, Tokens, UrlValue};
use crate::{Block, FnValue, Str, Text, Tokens, UrlValue};
use is_macro::Is;
use swc_common::{ast_node, Span};
@ -74,20 +74,29 @@ pub struct ImportRule {
#[ast_node("FontFaceRule")]
pub struct FontFaceRule {
pub span: Span,
pub block: DeclBlock,
pub block: Block,
}
#[ast_node]
pub enum NamespaceValue {
#[tag("UrlValue")]
Url(UrlValue),
#[tag("Str")]
Str(Str),
}
#[ast_node("NamespaceRule")]
pub struct NamespaceRule {
pub span: Span,
pub prefix: Text,
pub value: Str,
pub value: NamespaceValue,
}
#[ast_node("ViewportRule")]
pub struct ViewportRule {
pub span: Span,
pub block: DeclBlock,
pub block: Block,
}
#[ast_node("UnknownAtRule")]

View File

@ -1,4 +1,4 @@
use crate::{ComplexSelector, Property, Text};
use crate::{ComplexSelector, Declaration, Text};
use swc_common::{ast_node, Span};
#[ast_node("PageRule")]
@ -28,7 +28,7 @@ pub struct PageRuleBlock {
#[ast_node]
pub enum PageRuleBlockItem {
#[tag("DeclBlock")]
Property(Box<Property>),
Declaration(Box<Declaration>),
#[tag("NestedPageRule")]
Nested(Box<NestedPageRule>),

View File

@ -1,4 +1,4 @@
use crate::{Property, Rule};
use crate::{Declaration, Rule};
use swc_common::{ast_node, Span};
#[ast_node("SupportsRule")]
@ -21,8 +21,8 @@ pub enum SupportQuery {
#[tag("OrSupportQuery")]
Or(OrSupportQuery),
#[tag("Property")]
Property(Property),
#[tag("Declaration")]
Declaration(Declaration),
#[tag("ParenSupportQuery")]
Paren(ParenSupportQuery),

View File

@ -1,11 +1,10 @@
//! AST definitions for CSS.
pub use self::{at_rule::*, base::*, property::*, selector::*, style_rule::*, token::*, value::*};
pub use self::{at_rule::*, base::*, selector::*, style_rule::*, token::*, value::*};
use is_macro::Is;
use swc_common::{ast_node, Span};
mod at_rule;
mod base;
mod property;
mod selector;
mod style_rule;
mod token;

View File

@ -1,12 +0,0 @@
use crate::{Text, Value};
use swc_common::{ast_node, Span};
#[ast_node("Property")]
pub struct Property {
pub span: Span,
pub name: Text,
/// Separted by space.
pub values: Vec<Value>,
/// The span includes `!`
pub important: Option<Span>,
}

View File

@ -1,23 +1,32 @@
use crate::{ComplexSelector, Property, Tokens};
use crate::{ComplexSelector, Text, Tokens, Value};
use swc_common::{ast_node, Span};
#[ast_node("StyleRule")]
pub struct StyleRule {
pub span: Span,
pub selectors: Vec<ComplexSelector>,
pub block: DeclBlock,
pub block: Block,
}
#[ast_node("DeclBlock")]
pub struct DeclBlock {
#[ast_node("Block")]
pub struct Block {
pub span: Span,
pub items: Vec<DeclBlockItem>,
pub items: Vec<DeclarationBlockItem>,
}
#[ast_node]
pub enum DeclBlockItem {
pub enum DeclarationBlockItem {
#[tag("Tokens")]
Invalid(Tokens),
#[tag("Property")]
Property(Property),
#[tag("Declaration")]
Declaration(Declaration),
}
#[ast_node("Declaration")]
pub struct Declaration {
pub span: Span,
pub property: Text,
pub value: Vec<Value>,
/// The span includes `!`
pub important: Option<Span>,
}

View File

@ -13,10 +13,10 @@ auto_impl = "0.4.1"
bitflags = "1.3.2"
swc_atoms = {version = "0.2.7", path = "../../atoms"}
swc_common = {version = "0.14.0", path = "../../common"}
swc_css_ast = {version = "0.21.0", path = "../ast/"}
swc_css_ast = {version = "0.22.0", path = "../ast/"}
swc_css_codegen_macros = {version = "0.2.0", path = "macros/"}
[dev-dependencies]
swc_css_parser = {version = "0.23.0", path = "../parser"}
swc_css_visit = {version = "0.20.0", path = "../visit"}
swc_css_parser = {version = "0.24.0", path = "../parser"}
swc_css_visit = {version = "0.21.0", path = "../visit"}
testing = {version = "0.15.0", path = "../../testing"}

View File

@ -207,6 +207,13 @@ where
emit!(self, pseudo);
}
}
#[emitter]
fn emit_namespace_value(&mut self, n: &NamespaceValue) -> Result {
match n {
NamespaceValue::Url(n) => emit!(self, n),
NamespaceValue::Str(n) => emit!(self, n),
}
}
#[emitter]
fn emit_namespace_rule(&mut self, n: &NamespaceRule) -> Result {
@ -298,7 +305,7 @@ where
MediaQuery::Or(n) => emit!(self, n),
MediaQuery::Not(n) => emit!(self, n),
MediaQuery::Only(n) => emit!(self, n),
MediaQuery::Property(n) => {
MediaQuery::Declaration(n) => {
punct!(self, "(");
emit!(self, n);
punct!(self, ")");
@ -308,7 +315,7 @@ where
}
#[emitter]
fn emit_decl_block(&mut self, n: &DeclBlock) -> Result {
fn emit_block(&mut self, n: &Block) -> Result {
punct!(self, "{");
self.emit_list(&n.items, ListFormat::SemiDelimited | ListFormat::MultiLine)?;
@ -317,20 +324,21 @@ where
}
#[emitter]
fn emit_decl_block_item(&mut self, n: &DeclBlockItem) -> Result {
fn emit_declaration_block_item(&mut self, n: &DeclarationBlockItem) -> Result {
match n {
DeclBlockItem::Invalid(n) => emit!(self, n),
DeclBlockItem::Property(n) => emit!(self, n),
DeclarationBlockItem::Invalid(n) => emit!(self, n),
DeclarationBlockItem::Declaration(n) => emit!(self, n),
}
}
#[emitter]
fn emit_property(&mut self, n: &Property) -> Result {
emit!(self, n.name);
fn emit_declaration(&mut self, n: &Declaration) -> Result {
emit!(self, n.property);
punct!(self, ":");
formatting_space!(self);
self.emit_list(
&n.values,
&n.value,
ListFormat::SpaceDelimited | ListFormat::SingleLine,
)?;
@ -353,7 +361,7 @@ where
#[emitter]
fn emit_keyframe_block_rule(&mut self, n: &KeyframeBlockRule) -> Result {
match n {
KeyframeBlockRule::Decl(n) => emit!(self, n),
KeyframeBlockRule::Block(n) => emit!(self, n),
KeyframeBlockRule::AtRule(n) => emit!(self, n),
}
}
@ -370,7 +378,7 @@ where
SupportQuery::Not(n) => emit!(self, n),
SupportQuery::And(n) => emit!(self, n),
SupportQuery::Or(n) => emit!(self, n),
SupportQuery::Property(n) => {
SupportQuery::Declaration(n) => {
punct!(self, "(");
emit!(self, n);
punct!(self, ")");
@ -404,7 +412,7 @@ where
#[emitter]
fn emit_page_rule_block_item(&mut self, n: &PageRuleBlockItem) -> Result {
match n {
PageRuleBlockItem::Property(n) => emit!(self, n),
PageRuleBlockItem::Declaration(n) => emit!(self, n),
PageRuleBlockItem::Nested(n) => emit!(self, n),
}
}

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "Apache-2.0/MIT"
name = "swc_css_parser"
repository = "https://github.com/swc-project/swc.git"
version = "0.23.2"
version = "0.24.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
@ -17,11 +17,11 @@ bitflags = "1.2.1"
lexical = "5.2.2"
swc_atoms = {version = "0.2.7", path = "../../atoms"}
swc_common = {version = "0.14.0", path = "../../common"}
swc_css_ast = {version = "0.21.0", path = "../ast"}
swc_css_ast = {version = "0.22.0", path = "../ast"}
unicode-xid = "0.2.2"
[dev-dependencies]
serde = "1.0.127"
serde_json = "1.0.66"
swc_css_visit = {version = "0.20.0", path = "../visit"}
swc_css_visit = {version = "0.21.0", path = "../visit"}
testing = {version = "0.15.0", path = "../../testing"}

View File

@ -47,7 +47,7 @@ impl Error {
ErrorKind::InvalidKeyframeSelector => "Invalid keyframe selector".into(),
ErrorKind::InvalidMediaQuery => "Invalid media query".into(),
ErrorKind::UnknownAtRuleNotTerminated => "Unknown @rule is not terminated".into(),
ErrorKind::InvalidPropertyValue => "Expected a property value".into(),
ErrorKind::InvalidDeclarationValue => "Expected a property value".into(),
};
handler.struct_span_err(self.inner.0, &msg)
}
@ -69,8 +69,8 @@ pub enum ErrorKind {
UnterminatedBlockComment,
InvalidTypeSelector,
InvalidSelector,
InvalidPropertyValue,
InvalidAttrName,
InvalidDeclarationValue,
ExpectedIdentOrStrForAttrSelectorOp,
ExpectedNumber,
InvalidSupportQuery,

View File

@ -106,21 +106,36 @@ where
| "-ms-keyframes" => {
self.input.skip_ws()?;
let name = if is!(self, "{") {
Text {
let start_name_pos = self.input.cur_span()?.lo;
let name = match bump!(self) {
Token::Ident { value, raw } => Text {
span: span!(self, start_name_pos),
value,
raw,
},
Token::Str { value, raw } => Text {
span: span!(self, start_name_pos),
value,
raw,
},
_ => Text {
span: DUMMY_SP,
value: js_word!(""),
raw: js_word!(""),
}
} else {
self.parse_id()?
},
};
let mut blocks = vec![];
expect!(self, "{");
self.input.skip_ws()?;
let blocks = self.parse_delimited(true)?;
expect!(self, "}");
if is!(self, "{") {
expect!(self, "{");
// TODO: change on `parse_simple_block`
blocks = self.parse_delimited(true)?;
expect!(self, "}");
}
return Ok(AtRule::Keyframes(KeyframesRule {
span: span!(self, start),
@ -132,7 +147,7 @@ where
"font-face" => {
self.input.skip_ws()?;
let block = self.parse_decl_block()?;
let block = self.parse_simple_block()?;
return Ok(AtRule::FontFace(FontFaceRule {
span: span!(self, start),
@ -146,10 +161,11 @@ where
let query = self.parse()?;
expect!(self, "{");
let rules = self.parse_rules(RuleContext {
let rules = self.parse_rule_list(RuleContext {
is_top_level: false,
parse_selectors: true,
})?;
expect!(self, "}");
return Ok(AtRule::Supports(SupportsRule {
@ -165,10 +181,11 @@ where
let query = self.parse()?;
expect!(self, "{");
let rules = self.parse_rules(RuleContext {
let rules = self.parse_rule_list(RuleContext {
is_top_level: false,
parse_selectors: true,
})?;
expect!(self, "}");
return Ok(AtRule::Media(MediaRule {
@ -205,9 +222,49 @@ where
"namespace" => {
self.input.skip_ws()?;
let prefix = self.parse_id()?;
self.input.skip_ws()?;
let value = self.parse_str()?;
// TODO: make optional
let mut prefix = Text {
span: DUMMY_SP,
value: js_word!(""),
raw: js_word!(""),
};
if is!(self, Ident) {
let start_name_pos = self.input.cur_span()?.lo;
prefix = match bump!(self) {
Token::Ident { value, raw } => Text {
span: span!(self, start_name_pos),
value,
raw,
},
_ => {
unreachable!()
}
};
self.input.skip_ws()?;
}
let start_value_pos = self.input.cur_span()?.lo;
let value = match bump!(self) {
Token::Str { value, raw } => NamespaceValue::Str(Str {
span: span!(self, start_value_pos),
value,
raw,
}),
Token::Url { value, raw } => NamespaceValue::Url(UrlValue {
span: span!(self, start_value_pos),
url: value,
raw,
}),
_ => NamespaceValue::Str(Str {
span: span!(self, start_value_pos),
value: js_word!(""),
raw: js_word!(""),
}),
};
eat!(self, ";");
@ -221,7 +278,7 @@ where
"viewport" | "-ms-viewport" => {
self.input.skip_ws()?;
let block = self.parse_decl_block()?;
let block = self.parse_simple_block()?;
return Ok(AtRule::Viewport(ViewportRule {
span: span!(self, start),
@ -325,9 +382,8 @@ where
expect!(self, "{");
let block = self.parse_rules(RuleContext {
let block = self.parse_rule_list(RuleContext {
is_top_level: false,
parse_selectors: true,
})?;
expect!(self, "}");
@ -369,9 +425,9 @@ where
.map(KeyframeBlockRule::AtRule);
}
self.parse_decl_block()
self.parse_simple_block()
.map(Box::new)
.map(KeyframeBlockRule::Decl)
.map(KeyframeBlockRule::Block)
}
}
@ -453,9 +509,9 @@ where
query,
})
} else {
let property = self.parse_property()?;
let declaration = self.parse_declaration()?;
SupportQuery::Property(property)
SupportQuery::Declaration(declaration)
};
expect!(self, ")");
@ -526,14 +582,14 @@ where
allow_operation_in_value: true,
..self.ctx
};
let values = self.with_ctx(ctx).parse_property_values()?.0;
let value = self.with_ctx(ctx).parse_property_values()?.0;
expect!(self, ")");
MediaQuery::Property(Property {
MediaQuery::Declaration(Declaration {
span: span!(self, span.lo),
name: id,
values,
property: id,
value,
important: Default::default(),
})
} else {
@ -710,9 +766,9 @@ where
Token::AtKeyword { .. } => Ok(PageRuleBlockItem::Nested(self.parse()?)),
_ => {
let p = self
.parse_property()
.parse_declaration()
.map(Box::new)
.map(PageRuleBlockItem::Property)?;
.map(PageRuleBlockItem::Declaration)?;
eat!(self, ";");
Ok(p)
@ -727,13 +783,11 @@ where
{
fn parse(&mut self) -> PResult<NestedPageRule> {
let start = self.input.cur_span()?.lo;
let ctx = Ctx {
allow_at_selector: true,
..self.ctx
};
let prelude = self.with_ctx(ctx).parse_selectors()?;
let block = self.parse()?;
Ok(NestedPageRule {

View File

@ -86,44 +86,6 @@ where
self.parse()
}
fn parse_rules(&mut self, ctx: RuleContext) -> PResult<Vec<Rule>> {
let mut rules = vec![];
loop {
self.input.skip_ws()?;
if self.input.is_eof()? || is!(self, "}") {
return Ok(rules);
}
match cur!(self) {
Token::AtKeyword { .. } => {
let rule = self.parse_at_rule(Default::default())?;
rules.push(rule.into());
continue;
}
tok!("<!--") | tok!("-->") => {
if ctx.is_top_level {
self.input.bump()?;
continue;
}
}
_ => {}
}
if ctx.parse_selectors {
rules.push(self.parse_style_rule()?.into());
} else {
rules.push(self.parse_qualified_rule()?);
}
}
}
fn parse_qualified_rule(&mut self) -> PResult<Rule> {
todo!("parse_qualified_rule: {:?}", cur!(self))
}
fn may_parse_str(&mut self) -> PResult<Option<Str>> {
if is!(self, Str) {
self.parse_str().map(Some)
@ -162,9 +124,8 @@ where
}
#[derive(Clone, Copy)]
struct RuleContext {
pub struct RuleContext {
is_top_level: bool,
parse_selectors: bool,
}
impl<I> Parse<Stylesheet> for Parser<I>
@ -173,10 +134,7 @@ where
{
fn parse(&mut self) -> Result<Stylesheet, Error> {
let start = self.input.cur_span()?;
let rules = self.parse_rules(RuleContext {
is_top_level: true,
parse_selectors: true,
})?;
let rules = self.parse_rule_list(RuleContext { is_top_level: true })?;
let last = self.input.last_pos()?;

View File

@ -1,7 +1,7 @@
use super::{input::ParserInput, PResult, Parser};
use crate::{
error::{Error, ErrorKind},
parser::Ctx,
parser::{Ctx, RuleContext},
Parse,
};
use swc_common::Span;
@ -11,7 +11,39 @@ impl<I> Parser<I>
where
I: ParserInput,
{
pub(crate) fn parse_style_rule(&mut self) -> PResult<Rule> {
pub(crate) fn parse_rule_list(&mut self, ctx: RuleContext) -> PResult<Vec<Rule>> {
let mut rules = vec![];
loop {
// TODO: remove `}`
if self.input.is_eof()? || is!(self, "}") {
return Ok(rules);
}
match cur!(self) {
tok!(" ") => {
self.input.skip_ws()?;
}
tok!("<!--") | tok!("-->") => {
if ctx.is_top_level {
self.input.bump()?;
continue;
}
rules.push(self.parse_qualified_rule()?);
}
Token::AtKeyword { .. } => {
rules.push(self.parse_at_rule(Default::default())?.into());
}
_ => {
rules.push(self.parse_qualified_rule()?);
}
}
}
}
pub(crate) fn parse_qualified_rule(&mut self) -> PResult<Rule> {
let start_pos = self.input.cur_span()?.lo;
let start_state = self.input.state();
@ -39,8 +71,7 @@ where
}
};
let block = self.parse_decl_block()?;
let block = self.parse_simple_block()?;
let span = span!(self, start_pos);
Ok(Rule::Style(StyleRule {
@ -50,7 +81,7 @@ where
}))
}
pub(crate) fn parse_decl_block(&mut self) -> PResult<DeclBlock> {
pub(crate) fn parse_simple_block(&mut self) -> PResult<Block> {
let start = self.input.cur_span()?.lo;
expect!(self, "{");
@ -63,10 +94,10 @@ where
let span = span!(self, start);
Ok(DeclBlock { span, items })
Ok(Block { span, items })
}
fn parse_decl_block_items(&mut self) -> PResult<Vec<DeclBlockItem>> {
fn parse_decl_block_items(&mut self) -> PResult<Vec<DeclarationBlockItem>> {
let mut items = vec![];
while is!(self, Ident) {
@ -82,61 +113,87 @@ where
Ok(items)
}
pub(crate) fn parse_properties(&mut self) -> PResult<Vec<Property>> {
let mut props = vec![];
fn parse_declaration_list(&mut self) -> PResult<Vec<Declaration>> {
let mut declarations = vec![];
while is!(self, Ident) {
let p = self.parse_property()?;
props.push(p);
self.input.skip_ws()?;
if !eat!(self, ";") {
break;
loop {
if self.input.is_eof()? {
return Ok(declarations);
}
self.input.skip_ws()?;
let cur = self.input.cur()?;
match cur {
Some(tok!(" ")) => {
self.input.skip_ws()?;
}
Some(tok!(";")) => {
bump!(self);
}
Some(Token::AtKeyword { .. }) => {
// TODO: change on `parse_at_rule`
declarations.push(self.parse()?);
}
Some(Token::Ident { .. }) => {
declarations.push(self.parse()?);
self.input.skip_ws()?;
if !eat!(self, ";") {
break;
}
self.input.skip_ws()?;
}
_ => {}
}
}
Ok(props)
Ok(declarations)
}
pub(crate) fn parse_property(&mut self) -> PResult<Property> {
self.input.skip_ws()?;
pub(crate) fn parse_declaration(&mut self) -> PResult<Declaration> {
let start = self.input.cur_span()?.lo;
let name = self.parse_property_name()?;
self.input.skip_ws()?;
let property = self.parse_id()?;
self.input.skip_ws()?;
expect!(self, ":");
let (values, mut last_pos) = {
let mut value = vec![];
let mut end = self.input.cur_span()?.hi;
if !self.input.is_eof()? {
let ctx = Ctx {
allow_operation_in_value: false,
recover_from_property_value: true,
..self.ctx
};
self.with_ctx(ctx).parse_property_values()?
};
let (mut parsed_value, parsed_last_pos) = self.with_ctx(ctx).parse_property_values()?;
let important = self.parse_bang_important()?;
if important.is_some() {
last_pos = self.input.last_pos()?;
value.append(&mut parsed_value);
end = parsed_last_pos;
}
Ok(Property {
span: Span::new(start, last_pos, Default::default()),
name,
values,
let important = self.parse_bang_important()?;
if important.is_some() {
end = self.input.last_pos()?;
}
self.input.skip_ws()?;
Ok(Declaration {
span: Span::new(start, end, Default::default()),
property,
value,
important,
})
}
fn parse_property_name(&mut self) -> PResult<Text> {
self.input.skip_ws()?;
self.parse_id()
}
fn parse_bang_important(&mut self) -> PResult<Option<Span>> {
self.input.skip_ws()?;
@ -163,42 +220,42 @@ where
}
}
impl<I> Parse<Property> for Parser<I>
impl<I> Parse<Declaration> for Parser<I>
where
I: ParserInput,
{
fn parse(&mut self) -> PResult<Property> {
self.parse_property()
fn parse(&mut self) -> PResult<Declaration> {
self.parse_declaration()
}
}
impl<I> Parse<Vec<Property>> for Parser<I>
impl<I> Parse<Vec<Declaration>> for Parser<I>
where
I: ParserInput,
{
fn parse(&mut self) -> PResult<Vec<Property>> {
self.parse_properties()
fn parse(&mut self) -> PResult<Vec<Declaration>> {
self.parse_declaration_list()
}
}
impl<I> Parse<Vec<DeclBlockItem>> for Parser<I>
impl<I> Parse<Vec<DeclarationBlockItem>> for Parser<I>
where
I: ParserInput,
{
fn parse(&mut self) -> PResult<Vec<DeclBlockItem>> {
fn parse(&mut self) -> PResult<Vec<DeclarationBlockItem>> {
self.parse_decl_block_items()
}
}
impl<I> Parse<DeclBlockItem> for Parser<I>
impl<I> Parse<DeclarationBlockItem> for Parser<I>
where
I: ParserInput,
{
fn parse(&mut self) -> PResult<DeclBlockItem> {
fn parse(&mut self) -> PResult<DeclarationBlockItem> {
let start = self.input.state();
let start_pos = self.input.cur_span()?.lo;
let prop = self.parse().map(DeclBlockItem::Property);
let prop = self.parse().map(DeclarationBlockItem::Declaration);
match prop {
Ok(v) => return Ok(v),
@ -213,7 +270,7 @@ where
tokens.extend(self.input.bump()?);
}
Ok(DeclBlockItem::Invalid(Tokens {
Ok(DeclarationBlockItem::Invalid(Tokens {
span: span!(self, start_pos),
tokens,
}))

View File

@ -60,7 +60,7 @@ where
let v = Value::Lazy(Tokens { span, tokens });
self.errors
.push(Error::new(span, ErrorKind::InvalidPropertyValue));
.push(Error::new(span, ErrorKind::InvalidDeclarationValue));
return Ok((vec![v], hi));
}
@ -271,7 +271,7 @@ where
}));
}
Err(Error::new(span, ErrorKind::Expected("Property value")))
Err(Error::new(span, ErrorKind::Expected("Declaration value")))
}
/// This may parse operations, depending on the context.

View File

@ -1,4 +1,4 @@
error: Expected Property value
error: Expected Declaration value
--> $DIR/tests/errors/rome/invalid/media/ratio/input.css:1:26
|
1 | @media (aspect-ratio: 12/) {}

View File

@ -325,7 +325,7 @@ impl Visit for SpanVisualizer<'_> {
mtd!(SpaceValues, visit_space_values);
mtd!(ComplexSelector, visit_complex_selector);
mtd!(CompoundSelector, visit_compound_selector);
mtd!(DeclBlock, visit_decl_block);
mtd!(Block, visit_block);
mtd!(FnValue, visit_fn_value);
mtd!(HashValue, visit_hash_value);
mtd!(IdSelector, visit_id_selector);
@ -333,7 +333,7 @@ impl Visit for SpanVisualizer<'_> {
mtd!(Num, visit_num);
mtd!(ParenValue, visit_paren_value);
mtd!(PercentValue, visit_percent_value);
mtd!(Property, visit_property);
mtd!(Declaration, visit_declaration);
mtd!(PseudoSelector, visit_pseudo_selector);
mtd!(Rule, visit_rule);
mtd!(Str, visit_str);
@ -363,6 +363,7 @@ impl Visit for SpanVisualizer<'_> {
mtd!(KeyframesRule, visit_keyframes_rule);
mtd!(MediaQuery, visit_media_query);
mtd!(MediaRule, visit_media_rule);
mtd!(NamespaceValue, visit_namespace_value);
mtd!(NamespaceRule, visit_namespace_rule);
mtd!(NestedPageRule, visit_nested_page_rule);
mtd!(NotMediaQuery, visit_not_media_query);

View File

@ -0,0 +1,3 @@
@charset 'iso-8859-15'; /* Invalid, wrong quoting style used */
@charset "UTF-8"; /* Invalid, more than one space */
@charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */

View File

@ -0,0 +1,64 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 146,
"ctxt": 0
},
"rules": [
{
"type": "CharsetRule",
"span": {
"start": 0,
"end": 23,
"ctxt": 0
},
"charset": {
"type": "String",
"span": {
"start": 9,
"end": 22,
"ctxt": 0
},
"value": "iso-8859-15",
"raw": "'iso-8859-15'"
}
},
{
"type": "CharsetRule",
"span": {
"start": 64,
"end": 82,
"ctxt": 0
},
"charset": {
"type": "String",
"span": {
"start": 74,
"end": 81,
"ctxt": 0
},
"value": "UTF-8",
"raw": "\"UTF-8\""
}
},
{
"type": "CharsetRule",
"span": {
"start": 123,
"end": 140,
"ctxt": 0
},
"charset": {
"type": "String",
"span": {
"start": 132,
"end": 139,
"ctxt": 0
},
"value": "UTF-8",
"raw": "\"UTF-8\""
}
}
]
}

View File

@ -0,0 +1,80 @@
error: Stylesheet
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:1:1
|
1 | / @charset 'iso-8859-15'; /* Invalid, wrong quoting style used */
2 | | @charset "UTF-8"; /* Invalid, more than one space */
3 | | @charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */
| |_______________________^
error: Rule
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:1:1
|
1 | @charset 'iso-8859-15'; /* Invalid, wrong quoting style used */
| ^^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:1:1
|
1 | @charset 'iso-8859-15'; /* Invalid, wrong quoting style used */
| ^^^^^^^^^^^^^^^^^^^^^^^
error: CharsetRule
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:1:1
|
1 | @charset 'iso-8859-15'; /* Invalid, wrong quoting style used */
| ^^^^^^^^^^^^^^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:1:10
|
1 | @charset 'iso-8859-15'; /* Invalid, wrong quoting style used */
| ^^^^^^^^^^^^^
error: Rule
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:2:1
|
2 | @charset "UTF-8"; /* Invalid, more than one space */
| ^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:2:1
|
2 | @charset "UTF-8"; /* Invalid, more than one space */
| ^^^^^^^^^^^^^^^^^^
error: CharsetRule
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:2:1
|
2 | @charset "UTF-8"; /* Invalid, more than one space */
| ^^^^^^^^^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:2:11
|
2 | @charset "UTF-8"; /* Invalid, more than one space */
| ^^^^^^^
error: Rule
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:3:1
|
3 | @charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */
| ^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:3:1
|
3 | @charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */
| ^^^^^^^^^^^^^^^^^
error: CharsetRule
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:3:1
|
3 | @charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */
| ^^^^^^^^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/charset/invalid/input.css:3:10
|
3 | @charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */
| ^^^^^^^

View File

@ -0,0 +1 @@
@charset "utf-8";

View File

@ -0,0 +1,28 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 18,
"ctxt": 0
},
"rules": [
{
"type": "CharsetRule",
"span": {
"start": 0,
"end": 17,
"ctxt": 0
},
"charset": {
"type": "String",
"span": {
"start": 9,
"end": 16,
"ctxt": 0
},
"value": "utf-8",
"raw": "\"utf-8\""
}
}
]
}

View File

@ -0,0 +1,30 @@
error: Stylesheet
--> $DIR/tests/fixture/at-rule/charset/valid/input.css:1:1
|
1 | @charset "utf-8";
| ^^^^^^^^^^^^^^^^^^
error: Rule
--> $DIR/tests/fixture/at-rule/charset/valid/input.css:1:1
|
1 | @charset "utf-8";
| ^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/charset/valid/input.css:1:1
|
1 | @charset "utf-8";
| ^^^^^^^^^^^^^^^^^
error: CharsetRule
--> $DIR/tests/fixture/at-rule/charset/valid/input.css:1:1
|
1 | @charset "utf-8";
| ^^^^^^^^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/charset/valid/input.css:1:10
|
1 | @charset "utf-8";
| ^^^^^^^

View File

@ -0,0 +1,5 @@
@font-face {
font-family: "Open Sans";
src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
}

View File

@ -0,0 +1,210 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 180,
"ctxt": 0
},
"rules": [
{
"type": "FontFaceRule",
"span": {
"start": 0,
"end": 179,
"ctxt": 0
},
"block": {
"type": "Block",
"span": {
"start": 11,
"end": 179,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 17,
"end": 41,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 17,
"end": 28,
"ctxt": 0
},
"value": "font-family",
"raw": "font-family"
},
"value": [
{
"type": "String",
"span": {
"start": 30,
"end": 41,
"ctxt": 0
},
"value": "Open Sans",
"raw": "\"Open Sans\""
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 47,
"end": 176,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 47,
"end": 50,
"ctxt": 0
},
"value": "src",
"raw": "src"
},
"value": [
{
"type": "FnValue",
"span": {
"start": 52,
"end": 96,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 52,
"end": 55,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"args": [
{
"type": "String",
"span": {
"start": 56,
"end": 95,
"ctxt": 0
},
"value": "/fonts/OpenSans-Regular-webfont.woff2",
"raw": "\"/fonts/OpenSans-Regular-webfont.woff2\""
}
]
},
{
"type": "CommaValues",
"span": {
"start": 97,
"end": 161,
"ctxt": 0
},
"values": [
{
"type": "FnValue",
"span": {
"start": 97,
"end": 112,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 97,
"end": 103,
"ctxt": 0
},
"value": "format",
"raw": "format"
},
"args": [
{
"type": "String",
"span": {
"start": 104,
"end": 111,
"ctxt": 0
},
"value": "woff2",
"raw": "\"woff2\""
}
]
},
{
"type": "FnValue",
"span": {
"start": 118,
"end": 161,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 118,
"end": 121,
"ctxt": 0
},
"value": "url",
"raw": "url"
},
"args": [
{
"type": "String",
"span": {
"start": 122,
"end": 160,
"ctxt": 0
},
"value": "/fonts/OpenSans-Regular-webfont.woff",
"raw": "\"/fonts/OpenSans-Regular-webfont.woff\""
}
]
}
]
},
{
"type": "FnValue",
"span": {
"start": 162,
"end": 176,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 162,
"end": 168,
"ctxt": 0
},
"value": "format",
"raw": "format"
},
"args": [
{
"type": "String",
"span": {
"start": 169,
"end": 175,
"ctxt": 0
},
"value": "woff",
"raw": "\"woff\""
}
]
}
],
"important": null
}
]
}
}
]
}

View File

@ -0,0 +1,216 @@
error: Stylesheet
--> $DIR/tests/fixture/at-rule/font-face/input.css:1:1
|
1 | / @font-face {
2 | | font-family: "Open Sans";
3 | | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
4 | | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
5 | | }
| |__^
error: Rule
--> $DIR/tests/fixture/at-rule/font-face/input.css:1:1
|
1 | / @font-face {
2 | | font-family: "Open Sans";
3 | | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
4 | | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
5 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/at-rule/font-face/input.css:1:1
|
1 | / @font-face {
2 | | font-family: "Open Sans";
3 | | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
4 | | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
5 | | }
| |_^
error: FontFaceRule
--> $DIR/tests/fixture/at-rule/font-face/input.css:1:1
|
1 | / @font-face {
2 | | font-family: "Open Sans";
3 | | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
4 | | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
5 | | }
| |_^
error: Block
--> $DIR/tests/fixture/at-rule/font-face/input.css:1:12
|
1 | @font-face {
| ____________^
2 | | font-family: "Open Sans";
3 | | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
4 | | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
5 | | }
| |_^
error: Declaration
--> $DIR/tests/fixture/at-rule/font-face/input.css:2:5
|
2 | font-family: "Open Sans";
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/font-face/input.css:2:5
|
2 | font-family: "Open Sans";
| ^^^^^^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:2:18
|
2 | font-family: "Open Sans";
| ^^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/font-face/input.css:2:18
|
2 | font-family: "Open Sans";
| ^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:5
|
3 | / src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
4 | | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| |______________________________________________________________^
error: Text
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:5
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:10
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: FnValue
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:10
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:10
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:14
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:14
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:55
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| _______________________________________________________^
4 | | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| |_______________________________________________^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:55
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^^^^^^^^^^^^^
error: FnValue
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:55
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:55
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:62
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/font-face/input.css:3:62
|
3 | src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
| ^^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:5
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: FnValue
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:5
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:5
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:9
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:9
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:49
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^^^^^^^^^^^^
error: FnValue
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:49
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:49
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:56
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/font-face/input.css:4:56
|
4 | url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
| ^^^^^^

View File

@ -0,0 +1,20 @@
@keyframes foo { /* ... */ }
@keyframes "foo" { /* ... */ }
@keyframes foo { /* ... */ }
@keyframes slidein {
from {
transform: translateX(0%);
}
to {
transform: translateX(100%);
}
}
@keyframes identifier {
0% { top: 0; left: 0; }
30% { top: 50px; }
68%, 72% { left: 50px; }
100% { top: 100px; left: 100%; }
}

View File

@ -0,0 +1,694 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 368,
"ctxt": 0
},
"rules": [
{
"type": "KeyframesRule",
"span": {
"start": 0,
"end": 28,
"ctxt": 0
},
"id": {
"type": "Text",
"span": {
"start": 11,
"end": 14,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
},
"blocks": []
},
{
"type": "KeyframesRule",
"span": {
"start": 29,
"end": 59,
"ctxt": 0
},
"id": {
"type": "Text",
"span": {
"start": 40,
"end": 45,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
},
"blocks": []
},
{
"type": "KeyframesRule",
"span": {
"start": 60,
"end": 94,
"ctxt": 0
},
"id": {
"type": "Text",
"span": {
"start": 74,
"end": 77,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
},
"blocks": []
},
{
"type": "KeyframesRule",
"span": {
"start": 96,
"end": 223,
"ctxt": 0
},
"id": {
"type": "Text",
"span": {
"start": 107,
"end": 114,
"ctxt": 0
},
"value": "slidein",
"raw": "slidein"
},
"blocks": [
{
"span": {
"start": 121,
"end": 168,
"ctxt": 0
},
"selector": [
{
"type": "Text",
"span": {
"start": 121,
"end": 125,
"ctxt": 0
},
"value": "from",
"raw": "from"
}
],
"rule": {
"type": "Block",
"span": {
"start": 126,
"end": 168,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 136,
"end": 161,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 136,
"end": 145,
"ctxt": 0
},
"value": "transform",
"raw": "transform"
},
"value": [
{
"type": "FnValue",
"span": {
"start": 147,
"end": 161,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 147,
"end": 157,
"ctxt": 0
},
"value": "translateX",
"raw": "translateX"
},
"args": [
{
"type": "PercentValue",
"span": {
"start": 158,
"end": 160,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
],
"important": null
}
]
}
},
{
"span": {
"start": 174,
"end": 221,
"ctxt": 0
},
"selector": [
{
"type": "Text",
"span": {
"start": 174,
"end": 176,
"ctxt": 0
},
"value": "to",
"raw": "to"
}
],
"rule": {
"type": "Block",
"span": {
"start": 177,
"end": 221,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 187,
"end": 214,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 187,
"end": 196,
"ctxt": 0
},
"value": "transform",
"raw": "transform"
},
"value": [
{
"type": "FnValue",
"span": {
"start": 198,
"end": 214,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 198,
"end": 208,
"ctxt": 0
},
"value": "translateX",
"raw": "translateX"
},
"args": [
{
"type": "PercentValue",
"span": {
"start": 209,
"end": 213,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 209,
"end": 212,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
}
]
}
],
"important": null
}
]
}
}
]
},
{
"type": "KeyframesRule",
"span": {
"start": 225,
"end": 367,
"ctxt": 0
},
"id": {
"type": "Text",
"span": {
"start": 236,
"end": 246,
"ctxt": 0
},
"value": "identifier",
"raw": "identifier"
},
"blocks": [
{
"span": {
"start": 253,
"end": 276,
"ctxt": 0
},
"selector": [
{
"type": "PercentValue",
"span": {
"start": 253,
"end": 255,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 253,
"end": 254,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
],
"rule": {
"type": "Block",
"span": {
"start": 256,
"end": 276,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 258,
"end": 264,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"value": "top",
"raw": "top"
},
"value": [
{
"type": "Number",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 266,
"end": 273,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 266,
"end": 270,
"ctxt": 0
},
"value": "left",
"raw": "left"
},
"value": [
{
"type": "Number",
"span": {
"start": 272,
"end": 273,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"important": null
}
]
}
},
{
"span": {
"start": 281,
"end": 299,
"ctxt": 0
},
"selector": [
{
"type": "PercentValue",
"span": {
"start": 281,
"end": 284,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 281,
"end": 283,
"ctxt": 0
},
"value": 30.0,
"raw": "30"
}
}
],
"rule": {
"type": "Block",
"span": {
"start": 285,
"end": 299,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 287,
"end": 296,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 287,
"end": 290,
"ctxt": 0
},
"value": "top",
"raw": "top"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 292,
"end": 296,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 292,
"end": 294,
"ctxt": 0
},
"value": 50.0,
"raw": "50"
},
"unit": {
"span": {
"start": 294,
"end": 296,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
}
]
}
},
{
"span": {
"start": 304,
"end": 328,
"ctxt": 0
},
"selector": [
{
"type": "PercentValue",
"span": {
"start": 304,
"end": 307,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 304,
"end": 306,
"ctxt": 0
},
"value": 68.0,
"raw": "68"
}
},
{
"type": "PercentValue",
"span": {
"start": 309,
"end": 312,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 309,
"end": 311,
"ctxt": 0
},
"value": 72.0,
"raw": "72"
}
}
],
"rule": {
"type": "Block",
"span": {
"start": 313,
"end": 328,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 315,
"end": 325,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 315,
"end": 319,
"ctxt": 0
},
"value": "left",
"raw": "left"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 321,
"end": 325,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 321,
"end": 323,
"ctxt": 0
},
"value": 50.0,
"raw": "50"
},
"unit": {
"span": {
"start": 323,
"end": 325,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
}
]
}
},
{
"span": {
"start": 333,
"end": 365,
"ctxt": 0
},
"selector": [
{
"type": "PercentValue",
"span": {
"start": 333,
"end": 337,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 333,
"end": 336,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
}
],
"rule": {
"type": "Block",
"span": {
"start": 338,
"end": 365,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 340,
"end": 350,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 340,
"end": 343,
"ctxt": 0
},
"value": "top",
"raw": "top"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 345,
"end": 350,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 345,
"end": 348,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"unit": {
"span": {
"start": 348,
"end": 350,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 352,
"end": 362,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 352,
"end": 356,
"ctxt": 0
},
"value": "left",
"raw": "left"
},
"value": [
{
"type": "PercentValue",
"span": {
"start": 358,
"end": 362,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 358,
"end": 361,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
}
}
],
"important": null
}
]
}
}
]
}
]
}

View File

@ -0,0 +1,685 @@
error: Stylesheet
--> $DIR/tests/fixture/at-rule/keyframe/input.css:1:1
|
1 | / @keyframes foo { /* ... */ }
2 | | @keyframes "foo" { /* ... */ }
3 | | @keyframes foo { /* ... */ }
4 | |
... |
19 | | 100% { top: 100px; left: 100%; }
20 | | }
| |__^
error: Rule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:1:1
|
1 | @keyframes foo { /* ... */ }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:1:1
|
1 | @keyframes foo { /* ... */ }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: KeyframesRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:1:1
|
1 | @keyframes foo { /* ... */ }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:1:12
|
1 | @keyframes foo { /* ... */ }
| ^^^
error: Rule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:2:1
|
2 | @keyframes "foo" { /* ... */ }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:2:1
|
2 | @keyframes "foo" { /* ... */ }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: KeyframesRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:2:1
|
2 | @keyframes "foo" { /* ... */ }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:2:12
|
2 | @keyframes "foo" { /* ... */ }
| ^^^^^
error: Rule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:3:1
|
3 | @keyframes foo { /* ... */ }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:3:1
|
3 | @keyframes foo { /* ... */ }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: KeyframesRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:3:1
|
3 | @keyframes foo { /* ... */ }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:3:15
|
3 | @keyframes foo { /* ... */ }
| ^^^
error: Rule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:5:1
|
5 | / @keyframes slidein {
6 | | from {
7 | | transform: translateX(0%);
8 | | }
... |
12 | | }
13 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:5:1
|
5 | / @keyframes slidein {
6 | | from {
7 | | transform: translateX(0%);
8 | | }
... |
12 | | }
13 | | }
| |_^
error: KeyframesRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:5:1
|
5 | / @keyframes slidein {
6 | | from {
7 | | transform: translateX(0%);
8 | | }
... |
12 | | }
13 | | }
| |_^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:5:12
|
5 | @keyframes slidein {
| ^^^^^^^
error: KeyframeBlock
--> $DIR/tests/fixture/at-rule/keyframe/input.css:6:5
|
6 | / from {
7 | | transform: translateX(0%);
8 | | }
| |_____^
error: KeyframeSelector
--> $DIR/tests/fixture/at-rule/keyframe/input.css:6:5
|
6 | from {
| ^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:6:5
|
6 | from {
| ^^^^
error: KeyframeBlockRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:6:10
|
6 | from {
| __________^
7 | | transform: translateX(0%);
8 | | }
| |_____^
error: Block
--> $DIR/tests/fixture/at-rule/keyframe/input.css:6:10
|
6 | from {
| __________^
7 | | transform: translateX(0%);
8 | | }
| |_____^
error: Declaration
--> $DIR/tests/fixture/at-rule/keyframe/input.css:7:9
|
7 | transform: translateX(0%);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:7:9
|
7 | transform: translateX(0%);
| ^^^^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:7:20
|
7 | transform: translateX(0%);
| ^^^^^^^^^^^^^^
error: FnValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:7:20
|
7 | transform: translateX(0%);
| ^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:7:20
|
7 | transform: translateX(0%);
| ^^^^^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:7:31
|
7 | transform: translateX(0%);
| ^^
error: PercentValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:7:31
|
7 | transform: translateX(0%);
| ^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:7:31
|
7 | transform: translateX(0%);
| ^
error: KeyframeBlock
--> $DIR/tests/fixture/at-rule/keyframe/input.css:10:5
|
10 | / to {
11 | | transform: translateX(100%);
12 | | }
| |_____^
error: KeyframeSelector
--> $DIR/tests/fixture/at-rule/keyframe/input.css:10:5
|
10 | to {
| ^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:10:5
|
10 | to {
| ^^
error: KeyframeBlockRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:10:8
|
10 | to {
| ________^
11 | | transform: translateX(100%);
12 | | }
| |_____^
error: Block
--> $DIR/tests/fixture/at-rule/keyframe/input.css:10:8
|
10 | to {
| ________^
11 | | transform: translateX(100%);
12 | | }
| |_____^
error: Declaration
--> $DIR/tests/fixture/at-rule/keyframe/input.css:11:9
|
11 | transform: translateX(100%);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:11:9
|
11 | transform: translateX(100%);
| ^^^^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:11:20
|
11 | transform: translateX(100%);
| ^^^^^^^^^^^^^^^^
error: FnValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:11:20
|
11 | transform: translateX(100%);
| ^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:11:20
|
11 | transform: translateX(100%);
| ^^^^^^^^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:11:31
|
11 | transform: translateX(100%);
| ^^^^
error: PercentValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:11:31
|
11 | transform: translateX(100%);
| ^^^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:11:31
|
11 | transform: translateX(100%);
| ^^^
error: Rule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:15:1
|
15 | / @keyframes identifier {
16 | | 0% { top: 0; left: 0; }
17 | | 30% { top: 50px; }
18 | | 68%, 72% { left: 50px; }
19 | | 100% { top: 100px; left: 100%; }
20 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:15:1
|
15 | / @keyframes identifier {
16 | | 0% { top: 0; left: 0; }
17 | | 30% { top: 50px; }
18 | | 68%, 72% { left: 50px; }
19 | | 100% { top: 100px; left: 100%; }
20 | | }
| |_^
error: KeyframesRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:15:1
|
15 | / @keyframes identifier {
16 | | 0% { top: 0; left: 0; }
17 | | 30% { top: 50px; }
18 | | 68%, 72% { left: 50px; }
19 | | 100% { top: 100px; left: 100%; }
20 | | }
| |_^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:15:12
|
15 | @keyframes identifier {
| ^^^^^^^^^^
error: KeyframeBlock
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:5
|
16 | 0% { top: 0; left: 0; }
| ^^^^^^^^^^^^^^^^^^^^^^^
error: KeyframeSelector
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:5
|
16 | 0% { top: 0; left: 0; }
| ^^
error: PercentValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:5
|
16 | 0% { top: 0; left: 0; }
| ^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:5
|
16 | 0% { top: 0; left: 0; }
| ^
error: KeyframeBlockRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:8
|
16 | 0% { top: 0; left: 0; }
| ^^^^^^^^^^^^^^^^^^^^
error: Block
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:8
|
16 | 0% { top: 0; left: 0; }
| ^^^^^^^^^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:10
|
16 | 0% { top: 0; left: 0; }
| ^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:10
|
16 | 0% { top: 0; left: 0; }
| ^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:15
|
16 | 0% { top: 0; left: 0; }
| ^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:15
|
16 | 0% { top: 0; left: 0; }
| ^
error: Declaration
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:18
|
16 | 0% { top: 0; left: 0; }
| ^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:18
|
16 | 0% { top: 0; left: 0; }
| ^^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:24
|
16 | 0% { top: 0; left: 0; }
| ^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:16:24
|
16 | 0% { top: 0; left: 0; }
| ^
error: KeyframeBlock
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:5
|
17 | 30% { top: 50px; }
| ^^^^^^^^^^^^^^^^^^
error: KeyframeSelector
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:5
|
17 | 30% { top: 50px; }
| ^^^
error: PercentValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:5
|
17 | 30% { top: 50px; }
| ^^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:5
|
17 | 30% { top: 50px; }
| ^^
error: KeyframeBlockRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:9
|
17 | 30% { top: 50px; }
| ^^^^^^^^^^^^^^
error: Block
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:9
|
17 | 30% { top: 50px; }
| ^^^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:11
|
17 | 30% { top: 50px; }
| ^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:11
|
17 | 30% { top: 50px; }
| ^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:16
|
17 | 30% { top: 50px; }
| ^^^^
error: UnitValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:16
|
17 | 30% { top: 50px; }
| ^^^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:16
|
17 | 30% { top: 50px; }
| ^^
error: Unit
--> $DIR/tests/fixture/at-rule/keyframe/input.css:17:18
|
17 | 30% { top: 50px; }
| ^^
error: KeyframeBlock
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:5
|
18 | 68%, 72% { left: 50px; }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: KeyframeSelector
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:5
|
18 | 68%, 72% { left: 50px; }
| ^^^
error: PercentValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:5
|
18 | 68%, 72% { left: 50px; }
| ^^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:5
|
18 | 68%, 72% { left: 50px; }
| ^^
error: KeyframeSelector
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:10
|
18 | 68%, 72% { left: 50px; }
| ^^^
error: PercentValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:10
|
18 | 68%, 72% { left: 50px; }
| ^^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:10
|
18 | 68%, 72% { left: 50px; }
| ^^
error: KeyframeBlockRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:14
|
18 | 68%, 72% { left: 50px; }
| ^^^^^^^^^^^^^^^
error: Block
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:14
|
18 | 68%, 72% { left: 50px; }
| ^^^^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:16
|
18 | 68%, 72% { left: 50px; }
| ^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:16
|
18 | 68%, 72% { left: 50px; }
| ^^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:22
|
18 | 68%, 72% { left: 50px; }
| ^^^^
error: UnitValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:22
|
18 | 68%, 72% { left: 50px; }
| ^^^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:22
|
18 | 68%, 72% { left: 50px; }
| ^^
error: Unit
--> $DIR/tests/fixture/at-rule/keyframe/input.css:18:24
|
18 | 68%, 72% { left: 50px; }
| ^^
error: KeyframeBlock
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:5
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: KeyframeSelector
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:5
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^
error: PercentValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:5
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:5
|
19 | 100% { top: 100px; left: 100%; }
| ^^^
error: KeyframeBlockRule
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:10
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Block
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:10
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:12
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:12
|
19 | 100% { top: 100px; left: 100%; }
| ^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:17
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^^
error: UnitValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:17
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:17
|
19 | 100% { top: 100px; left: 100%; }
| ^^^
error: Unit
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:20
|
19 | 100% { top: 100px; left: 100%; }
| ^^
error: Declaration
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:24
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:24
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^
error: Value
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:30
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^
error: PercentValue
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:30
|
19 | 100% { top: 100px; left: 100%; }
| ^^^^
error: Num
--> $DIR/tests/fixture/at-rule/keyframe/input.css:19:30
|
19 | 100% { top: 100px; left: 100%; }
| ^^^

View File

@ -0,0 +1,6 @@
@namespace empty "";
@namespace "";
@namespace url(http://www.w3.org/1999/xhtml);
@namespace svg url(http://www.w3.org/2000/svg);
@namespace "http://www.w3.org/1999/xhtml";
@namespace svg "http://www.w3.org/2000/svg";

View File

@ -0,0 +1,178 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 218,
"ctxt": 0
},
"rules": [
{
"type": "NamespaceRule",
"span": {
"start": 0,
"end": 20,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 11,
"end": 16,
"ctxt": 0
},
"value": "empty",
"raw": "empty"
},
"value": {
"type": "String",
"span": {
"start": 17,
"end": 19,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
},
{
"type": "NamespaceRule",
"span": {
"start": 21,
"end": 35,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"value": "",
"raw": ""
},
"value": {
"type": "String",
"span": {
"start": 32,
"end": 34,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
},
{
"type": "NamespaceRule",
"span": {
"start": 36,
"end": 81,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"value": "",
"raw": ""
},
"value": {
"type": "UrlValue",
"span": {
"start": 47,
"end": 80,
"ctxt": 0
},
"url": "http://www.w3.org/1999/xhtml",
"raw": "http://www.w3.org/1999/xhtml"
}
},
{
"type": "NamespaceRule",
"span": {
"start": 82,
"end": 129,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 93,
"end": 96,
"ctxt": 0
},
"value": "svg",
"raw": "svg"
},
"value": {
"type": "UrlValue",
"span": {
"start": 97,
"end": 128,
"ctxt": 0
},
"url": "http://www.w3.org/2000/svg",
"raw": "http://www.w3.org/2000/svg"
}
},
{
"type": "NamespaceRule",
"span": {
"start": 130,
"end": 172,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"value": "",
"raw": ""
},
"value": {
"type": "String",
"span": {
"start": 141,
"end": 171,
"ctxt": 0
},
"value": "http://www.w3.org/1999/xhtml",
"raw": "\"http://www.w3.org/1999/xhtml\""
}
},
{
"type": "NamespaceRule",
"span": {
"start": 173,
"end": 217,
"ctxt": 0
},
"prefix": {
"type": "Text",
"span": {
"start": 184,
"end": 187,
"ctxt": 0
},
"value": "svg",
"raw": "svg"
},
"value": {
"type": "String",
"span": {
"start": 188,
"end": 216,
"ctxt": 0
},
"value": "http://www.w3.org/2000/svg",
"raw": "\"http://www.w3.org/2000/svg\""
}
}
]
}

View File

@ -0,0 +1,211 @@
error: Stylesheet
--> $DIR/tests/fixture/at-rule/namespace/input.css:1:1
|
1 | / @namespace empty "";
2 | | @namespace "";
3 | | @namespace url(http://www.w3.org/1999/xhtml);
4 | | @namespace svg url(http://www.w3.org/2000/svg);
5 | | @namespace "http://www.w3.org/1999/xhtml";
6 | | @namespace svg "http://www.w3.org/2000/svg";
| |_____________________________________________^
error: Rule
--> $DIR/tests/fixture/at-rule/namespace/input.css:1:1
|
1 | @namespace empty "";
| ^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:1:1
|
1 | @namespace empty "";
| ^^^^^^^^^^^^^^^^^^^^
error: NamespaceRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:1:1
|
1 | @namespace empty "";
| ^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/namespace/input.css:1:12
|
1 | @namespace empty "";
| ^^^^^
error: NamespaceValue
--> $DIR/tests/fixture/at-rule/namespace/input.css:1:18
|
1 | @namespace empty "";
| ^^
error: Str
--> $DIR/tests/fixture/at-rule/namespace/input.css:1:18
|
1 | @namespace empty "";
| ^^
error: Rule
--> $DIR/tests/fixture/at-rule/namespace/input.css:2:1
|
2 | @namespace "";
| ^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:2:1
|
2 | @namespace "";
| ^^^^^^^^^^^^^^
error: NamespaceRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:2:1
|
2 | @namespace "";
| ^^^^^^^^^^^^^^
error: Text
error: NamespaceValue
--> $DIR/tests/fixture/at-rule/namespace/input.css:2:12
|
2 | @namespace "";
| ^^
error: Str
--> $DIR/tests/fixture/at-rule/namespace/input.css:2:12
|
2 | @namespace "";
| ^^
error: Rule
--> $DIR/tests/fixture/at-rule/namespace/input.css:3:1
|
3 | @namespace url(http://www.w3.org/1999/xhtml);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:3:1
|
3 | @namespace url(http://www.w3.org/1999/xhtml);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: NamespaceRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:3:1
|
3 | @namespace url(http://www.w3.org/1999/xhtml);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: NamespaceValue
--> $DIR/tests/fixture/at-rule/namespace/input.css:3:12
|
3 | @namespace url(http://www.w3.org/1999/xhtml);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: UrlValue
--> $DIR/tests/fixture/at-rule/namespace/input.css:3:12
|
3 | @namespace url(http://www.w3.org/1999/xhtml);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Rule
--> $DIR/tests/fixture/at-rule/namespace/input.css:4:1
|
4 | @namespace svg url(http://www.w3.org/2000/svg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:4:1
|
4 | @namespace svg url(http://www.w3.org/2000/svg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: NamespaceRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:4:1
|
4 | @namespace svg url(http://www.w3.org/2000/svg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/namespace/input.css:4:12
|
4 | @namespace svg url(http://www.w3.org/2000/svg);
| ^^^
error: NamespaceValue
--> $DIR/tests/fixture/at-rule/namespace/input.css:4:16
|
4 | @namespace svg url(http://www.w3.org/2000/svg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: UrlValue
--> $DIR/tests/fixture/at-rule/namespace/input.css:4:16
|
4 | @namespace svg url(http://www.w3.org/2000/svg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Rule
--> $DIR/tests/fixture/at-rule/namespace/input.css:5:1
|
5 | @namespace "http://www.w3.org/1999/xhtml";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:5:1
|
5 | @namespace "http://www.w3.org/1999/xhtml";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: NamespaceRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:5:1
|
5 | @namespace "http://www.w3.org/1999/xhtml";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: NamespaceValue
--> $DIR/tests/fixture/at-rule/namespace/input.css:5:12
|
5 | @namespace "http://www.w3.org/1999/xhtml";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/namespace/input.css:5:12
|
5 | @namespace "http://www.w3.org/1999/xhtml";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Rule
--> $DIR/tests/fixture/at-rule/namespace/input.css:6:1
|
6 | @namespace svg "http://www.w3.org/2000/svg";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:6:1
|
6 | @namespace svg "http://www.w3.org/2000/svg";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: NamespaceRule
--> $DIR/tests/fixture/at-rule/namespace/input.css:6:1
|
6 | @namespace svg "http://www.w3.org/2000/svg";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/namespace/input.css:6:12
|
6 | @namespace svg "http://www.w3.org/2000/svg";
| ^^^
error: NamespaceValue
--> $DIR/tests/fixture/at-rule/namespace/input.css:6:16
|
6 | @namespace svg "http://www.w3.org/2000/svg";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Str
--> $DIR/tests/fixture/at-rule/namespace/input.css:6:16
|
6 | @namespace svg "http://www.w3.org/2000/svg";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -56,13 +56,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 23,
"end": 34,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 23,
@ -72,7 +72,7 @@
"value": "margin",
"raw": "margin"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -122,13 +122,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 43,
"end": 54,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 43,
@ -138,7 +138,7 @@
"value": "margin",
"raw": "margin"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -188,13 +188,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 63,
"end": 74,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 63,
@ -204,7 +204,7 @@
"value": "margin",
"raw": "margin"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -273,13 +273,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 91,
"end": 102,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 91,
@ -289,7 +289,7 @@
"value": "margin",
"raw": "margin"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -358,13 +358,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 118,
"end": 129,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 118,
@ -374,7 +374,7 @@
"value": "margin",
"raw": "margin"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -443,13 +443,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 145,
"end": 156,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 145,
@ -459,7 +459,7 @@
"value": "margin",
"raw": "margin"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {

View File

@ -88,7 +88,7 @@ error: PageRuleBlockItem
3 | @page{margin: 1cm}
| ^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/at-rule/page/input.css:3:7
|
3 | @page{margin: 1cm}
@ -154,7 +154,7 @@ error: PageRuleBlockItem
4 | @page {margin: 1cm}
| ^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/at-rule/page/input.css:4:8
|
4 | @page {margin: 1cm}
@ -220,7 +220,7 @@ error: PageRuleBlockItem
5 | @page {margin: 1cm;}
| ^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/at-rule/page/input.css:5:8
|
5 | @page {margin: 1cm;}
@ -298,7 +298,7 @@ error: PageRuleBlockItem
6 | @page :first {margin: 2cm}
| ^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/at-rule/page/input.css:6:15
|
6 | @page :first {margin: 2cm}
@ -376,7 +376,7 @@ error: PageRuleBlockItem
7 | @page :first {margin: 2cm;}
| ^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/at-rule/page/input.css:7:15
|
7 | @page :first {margin: 2cm;}
@ -454,7 +454,7 @@ error: PageRuleBlockItem
8 | @page :first{margin: 2cm;}
| ^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/at-rule/page/input.css:8:14
|
8 | @page :first{margin: 2cm;}

View File

@ -1,2 +1,36 @@
/*@unknown;*/
/*@unknown x y;*/
/*@unknown \"blah\";*/
/*@unknown!*test*!;*/
/*@unknown!*test*!x!*test*! y;*/
/*@unknown ;*/
/*@unknown x y;*/
@unknown {}
@\unknown {}
/*@unknown a b {}*/
@unknown {p:v}
/*@unknown x y {p:v}*/
/*@unknown x, y x(1+2) {p:v}*/
@unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
/*@unknown!*test*!x!*test*! y!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}*/
/*@unknown!*test*!x!*test*!,!*test*!y!*test*! x(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}*/
/*@unknown { p : v }*/
/*@unknown x y { p : v }*/
/*@unknown x , y x( 1 + 2 ) { p : v }*/
@unknown {s{p:v}}
/*@unknown x y {s{p:v}}*/
/*@unknown x, y f(1+2) {s{p:v}}*/
/*@unknown { .a { p: v; } .b { p: v } }*/
/*@unknown!*test*!{!*test*!s!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}!*test*!}*/
/*@unknown!*test*!x!*test*! y!*test*!{!*test*!s!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}!*test*!}*/
/*@unknown!*test*!x!*test*!,!*test*!y!*test*! f(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!s!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}!*test*!}*/
/*@unknown { s { p : v } }*/
/*@unknown x y { s { p : v } }*/
/*@unknown x , y f( 1 2 ) { s { p : v } }*/
@unknown {
--> {}
<!-- {}
}

View File

@ -1,23 +1,23 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 25,
"start": 147,
"end": 1286,
"ctxt": 0
},
"rules": [
{
"type": "UnknownAtRule",
"span": {
"start": 0,
"end": 11,
"start": 147,
"end": 158,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 0,
"end": 8,
"start": 147,
"end": 155,
"ctxt": 0
},
"value": "unknown",
@ -26,23 +26,23 @@
"tokens": {
"type": "Tokens",
"span": {
"start": 9,
"end": 11,
"start": 156,
"end": 158,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 9,
"end": 10,
"start": 156,
"end": 157,
"ctxt": 0
},
"token": "LBrace"
},
{
"span": {
"start": 10,
"end": 11,
"start": 157,
"end": 158,
"ctxt": 0
},
"token": "RBrace"
@ -53,15 +53,15 @@
{
"type": "UnknownAtRule",
"span": {
"start": 12,
"end": 24,
"start": 159,
"end": 171,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 12,
"end": 21,
"start": 159,
"end": 168,
"ctxt": 0
},
"value": "unknown",
@ -70,23 +70,418 @@
"tokens": {
"type": "Tokens",
"span": {
"start": 22,
"end": 24,
"start": 169,
"end": 171,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 22,
"end": 23,
"start": 169,
"end": 170,
"ctxt": 0
},
"token": "LBrace"
},
{
"span": {
"start": 23,
"end": 24,
"start": 170,
"end": 171,
"ctxt": 0
},
"token": "RBrace"
}
]
}
},
{
"type": "UnknownAtRule",
"span": {
"start": 192,
"end": 206,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 192,
"end": 200,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
},
"tokens": {
"type": "Tokens",
"span": {
"start": 201,
"end": 206,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 201,
"end": 202,
"ctxt": 0
},
"token": "LBrace"
},
{
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"token": {
"Ident": {
"value": "p",
"raw": "p"
}
}
},
{
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"token": "Colon"
},
{
"span": {
"start": 204,
"end": 205,
"ctxt": 0
},
"token": {
"Ident": {
"value": "v",
"raw": "v"
}
}
},
{
"span": {
"start": 205,
"end": 206,
"ctxt": 0
},
"token": "RBrace"
}
]
}
},
{
"type": "UnknownAtRule",
"span": {
"start": 261,
"end": 314,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 261,
"end": 269,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
},
"tokens": {
"type": "Tokens",
"span": {
"start": 277,
"end": 314,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"token": "LBrace"
},
{
"span": {
"start": 286,
"end": 287,
"ctxt": 0
},
"token": {
"Ident": {
"value": "p",
"raw": "p"
}
}
},
{
"span": {
"start": 295,
"end": 296,
"ctxt": 0
},
"token": "Colon"
},
{
"span": {
"start": 304,
"end": 305,
"ctxt": 0
},
"token": {
"Ident": {
"value": "v",
"raw": "v"
}
}
},
{
"span": {
"start": 313,
"end": 314,
"ctxt": 0
},
"token": "RBrace"
}
]
}
},
{
"type": "UnknownAtRule",
"span": {
"start": 640,
"end": 657,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 640,
"end": 648,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
},
"tokens": {
"type": "Tokens",
"span": {
"start": 649,
"end": 657,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 649,
"end": 650,
"ctxt": 0
},
"token": "LBrace"
},
{
"span": {
"start": 650,
"end": 651,
"ctxt": 0
},
"token": {
"Ident": {
"value": "s",
"raw": "s"
}
}
},
{
"span": {
"start": 651,
"end": 652,
"ctxt": 0
},
"token": "LBrace"
},
{
"span": {
"start": 652,
"end": 653,
"ctxt": 0
},
"token": {
"Ident": {
"value": "p",
"raw": "p"
}
}
},
{
"span": {
"start": 653,
"end": 654,
"ctxt": 0
},
"token": "Colon"
},
{
"span": {
"start": 654,
"end": 655,
"ctxt": 0
},
"token": {
"Ident": {
"value": "v",
"raw": "v"
}
}
},
{
"span": {
"start": 655,
"end": 656,
"ctxt": 0
},
"token": "RBrace"
},
{
"span": {
"start": 656,
"end": 657,
"ctxt": 0
},
"token": "RBrace"
}
]
}
},
{
"type": "UnknownAtRule",
"span": {
"start": 1250,
"end": 1285,
"ctxt": 0
},
"name": {
"type": "Text",
"span": {
"start": 1250,
"end": 1258,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
},
"tokens": {
"type": "Tokens",
"span": {
"start": 1259,
"end": 1285,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 1259,
"end": 1260,
"ctxt": 0
},
"token": "LBrace"
},
{
"span": {
"start": 1260,
"end": 1265,
"ctxt": 0
},
"token": "WhiteSpace"
},
{
"span": {
"start": 1265,
"end": 1268,
"ctxt": 0
},
"token": "CDC"
},
{
"span": {
"start": 1268,
"end": 1269,
"ctxt": 0
},
"token": "WhiteSpace"
},
{
"span": {
"start": 1269,
"end": 1270,
"ctxt": 0
},
"token": "LBrace"
},
{
"span": {
"start": 1270,
"end": 1271,
"ctxt": 0
},
"token": "RBrace"
},
{
"span": {
"start": 1271,
"end": 1276,
"ctxt": 0
},
"token": "WhiteSpace"
},
{
"span": {
"start": 1276,
"end": 1280,
"ctxt": 0
},
"token": "CDO"
},
{
"span": {
"start": 1280,
"end": 1281,
"ctxt": 0
},
"token": "WhiteSpace"
},
{
"span": {
"start": 1281,
"end": 1282,
"ctxt": 0
},
"token": "LBrace"
},
{
"span": {
"start": 1282,
"end": 1283,
"ctxt": 0
},
"token": "RBrace"
},
{
"span": {
"start": 1283,
"end": 1284,
"ctxt": 0
},
"token": "WhiteSpace"
},
{
"span": {
"start": 1284,
"end": 1285,
"ctxt": 0
},
"token": "RBrace"

View File

@ -1,91 +1,421 @@
error: Stylesheet
--> $DIR/tests/fixture/at-rule/unknown/input.css:1:1
|
1 | / @unknown {}
2 | | @\unknown {}
| |_____________^
--> $DIR/tests/fixture/at-rule/unknown/input.css:9:1
|
9 | / @unknown {}
10 | | @\unknown {}
11 | | /*@unknown a b {}*/
12 | | @unknown {p:v}
... |
35 | | <!-- {}
36 | | }
| |__^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:1:1
--> $DIR/tests/fixture/at-rule/unknown/input.css:9:1
|
1 | @unknown {}
9 | @unknown {}
| ^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:1:1
--> $DIR/tests/fixture/at-rule/unknown/input.css:9:1
|
1 | @unknown {}
9 | @unknown {}
| ^^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:1:1
--> $DIR/tests/fixture/at-rule/unknown/input.css:9:1
|
1 | @unknown {}
9 | @unknown {}
| ^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/unknown/input.css:1:1
--> $DIR/tests/fixture/at-rule/unknown/input.css:9:1
|
1 | @unknown {}
9 | @unknown {}
| ^^^^^^^^
error: Tokens
--> $DIR/tests/fixture/at-rule/unknown/input.css:1:10
--> $DIR/tests/fixture/at-rule/unknown/input.css:9:10
|
1 | @unknown {}
9 | @unknown {}
| ^^
error: LBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:1:10
--> $DIR/tests/fixture/at-rule/unknown/input.css:9:10
|
1 | @unknown {}
9 | @unknown {}
| ^
error: RBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:1:11
--> $DIR/tests/fixture/at-rule/unknown/input.css:9:11
|
1 | @unknown {}
9 | @unknown {}
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:2:1
|
2 | @\unknown {}
| ^^^^^^^^^^^^
--> $DIR/tests/fixture/at-rule/unknown/input.css:10:1
|
10 | @\unknown {}
| ^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:2:1
|
2 | @\unknown {}
| ^^^^^^^^^^^^
--> $DIR/tests/fixture/at-rule/unknown/input.css:10:1
|
10 | @\unknown {}
| ^^^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:2:1
|
2 | @\unknown {}
| ^^^^^^^^^^^^
--> $DIR/tests/fixture/at-rule/unknown/input.css:10:1
|
10 | @\unknown {}
| ^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/unknown/input.css:2:1
|
2 | @\unknown {}
| ^^^^^^^^^
--> $DIR/tests/fixture/at-rule/unknown/input.css:10:1
|
10 | @\unknown {}
| ^^^^^^^^^
error: Tokens
--> $DIR/tests/fixture/at-rule/unknown/input.css:2:11
|
2 | @\unknown {}
| ^^
--> $DIR/tests/fixture/at-rule/unknown/input.css:10:11
|
10 | @\unknown {}
| ^^
error: LBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:2:11
|
2 | @\unknown {}
| ^
--> $DIR/tests/fixture/at-rule/unknown/input.css:10:11
|
10 | @\unknown {}
| ^
error: RBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:2:12
|
2 | @\unknown {}
| ^
--> $DIR/tests/fixture/at-rule/unknown/input.css:10:12
|
10 | @\unknown {}
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:1
|
12 | @unknown {p:v}
| ^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:1
|
12 | @unknown {p:v}
| ^^^^^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:1
|
12 | @unknown {p:v}
| ^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:1
|
12 | @unknown {p:v}
| ^^^^^^^^
error: Tokens
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:10
|
12 | @unknown {p:v}
| ^^^^^
error: LBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:10
|
12 | @unknown {p:v}
| ^
error: Ident { value: Atom('p' type=inline), raw: Atom('p' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:11
|
12 | @unknown {p:v}
| ^
error: Colon
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:12
|
12 | @unknown {p:v}
| ^
error: Ident { value: Atom('v' type=inline), raw: Atom('v' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:13
|
12 | @unknown {p:v}
| ^
error: RBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:12:14
|
12 | @unknown {p:v}
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:1
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:1
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:1
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:1
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^^^^^^^^
error: Tokens
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:17
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: LBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:17
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^
error: Ident { value: Atom('p' type=inline), raw: Atom('p' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:26
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^
error: Colon
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:35
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^
error: Ident { value: Atom('v' type=inline), raw: Atom('v' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:44
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^
error: RBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:15:53
|
15 | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:1
|
22 | @unknown {s{p:v}}
| ^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:1
|
22 | @unknown {s{p:v}}
| ^^^^^^^^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:1
|
22 | @unknown {s{p:v}}
| ^^^^^^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:1
|
22 | @unknown {s{p:v}}
| ^^^^^^^^
error: Tokens
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:10
|
22 | @unknown {s{p:v}}
| ^^^^^^^^
error: LBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:10
|
22 | @unknown {s{p:v}}
| ^
error: Ident { value: Atom('s' type=inline), raw: Atom('s' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:11
|
22 | @unknown {s{p:v}}
| ^
error: LBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:12
|
22 | @unknown {s{p:v}}
| ^
error: Ident { value: Atom('p' type=inline), raw: Atom('p' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:13
|
22 | @unknown {s{p:v}}
| ^
error: Colon
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:14
|
22 | @unknown {s{p:v}}
| ^
error: Ident { value: Atom('v' type=inline), raw: Atom('v' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:15
|
22 | @unknown {s{p:v}}
| ^
error: RBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:16
|
22 | @unknown {s{p:v}}
| ^
error: RBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:22:17
|
22 | @unknown {s{p:v}}
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:33:1
|
33 | / @unknown {
34 | | --> {}
35 | | <!-- {}
36 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:33:1
|
33 | / @unknown {
34 | | --> {}
35 | | <!-- {}
36 | | }
| |_^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:33:1
|
33 | / @unknown {
34 | | --> {}
35 | | <!-- {}
36 | | }
| |_^
error: Text
--> $DIR/tests/fixture/at-rule/unknown/input.css:33:1
|
33 | @unknown {
| ^^^^^^^^
error: Tokens
--> $DIR/tests/fixture/at-rule/unknown/input.css:33:10
|
33 | @unknown {
| __________^
34 | | --> {}
35 | | <!-- {}
36 | | }
| |_^
error: LBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:33:10
|
33 | @unknown {
| ^
error: WhiteSpace
--> $DIR/tests/fixture/at-rule/unknown/input.css:33:11
|
33 | @unknown {
| ___________^
34 | | --> {}
| |____^
error: CDC
--> $DIR/tests/fixture/at-rule/unknown/input.css:34:5
|
34 | --> {}
| ^^^
error: WhiteSpace
--> $DIR/tests/fixture/at-rule/unknown/input.css:34:8
|
34 | --> {}
| ^
error: LBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:34:9
|
34 | --> {}
| ^
error: RBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:34:10
|
34 | --> {}
| ^
error: WhiteSpace
--> $DIR/tests/fixture/at-rule/unknown/input.css:34:11
|
34 | --> {}
| ___________^
35 | | <!-- {}
| |____^
error: CDO
--> $DIR/tests/fixture/at-rule/unknown/input.css:35:5
|
35 | <!-- {}
| ^^^^
error: WhiteSpace
--> $DIR/tests/fixture/at-rule/unknown/input.css:35:9
|
35 | <!-- {}
| ^
error: LBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:35:10
|
35 | <!-- {}
| ^
error: RBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:35:11
|
35 | <!-- {}
| ^
error: WhiteSpace
--> $DIR/tests/fixture/at-rule/unknown/input.css:35:12
|
35 | <!-- {}
| ____________^
36 | | }
| |_
error: RBrace
--> $DIR/tests/fixture/at-rule/unknown/input.css:36:1
|
36 | }
| ^

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 28,
"end": 94,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 43,
"end": 78,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 43,
@ -80,7 +80,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "Text",
"span": {
@ -147,7 +147,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 136,
"end": 227,
@ -155,13 +155,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 159,
"end": 171,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 159,
@ -171,7 +171,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "Text",
"span": {
@ -186,13 +186,13 @@
"important": null
},
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 195,
"end": 210,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 195,
@ -202,7 +202,7 @@
"value": "background",
"raw": "background"
},
"values": [
"value": [
{
"type": "Text",
"span": {
@ -269,7 +269,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 239,
"end": 272,
@ -277,13 +277,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 245,
"end": 257,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 245,
@ -293,7 +293,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "Text",
"span": {

View File

@ -55,7 +55,7 @@ error: Text
1 | /* comment */a/* comment */
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/comment/input.css:2:1
|
2 | / {
@ -63,7 +63,7 @@ error: DeclBlock
4 | | }
| |_^
error: Property
error: Declaration
--> $DIR/tests/fixture/comment/input.css:3:14
|
3 | /* comment */color/* comment */:/* comment */red/* comment */;
@ -135,7 +135,7 @@ error: Text
9 | div {
| ^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/comment/input.css:9:5
|
9 | div {
@ -148,7 +148,7 @@ error: DeclBlock
15 | | }
| |_^
error: Property
error: Declaration
--> $DIR/tests/fixture/comment/input.css:11:5
|
11 | color: black;
@ -172,7 +172,7 @@ error: Text
11 | color: black;
| ^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/comment/input.css:13:5
|
13 | background: red;
@ -238,7 +238,7 @@ error: Text
18 | a {
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/comment/input.css:18:3
|
18 | a {
@ -248,7 +248,7 @@ error: DeclBlock
21 | | }
| |_^
error: Property
error: Declaration
--> $DIR/tests/fixture/comment/input.css:19:5
|
19 | color: black;

View File

@ -0,0 +1,4 @@
a {
prop1: value;
prop2: value;
}

View File

@ -0,0 +1,132 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 42,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 41,
"ctxt": 0
},
"selectors": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": []
}
]
}
],
"block": {
"type": "Block",
"span": {
"start": 2,
"end": 41,
"ctxt": 0
},
"items": [
{
"type": "Declaration",
"span": {
"start": 8,
"end": 20,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 8,
"end": 13,
"ctxt": 0
},
"value": "prop1",
"raw": "prop1"
},
"value": [
{
"type": "Text",
"span": {
"start": 15,
"end": 20,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 26,
"end": 38,
"ctxt": 0
},
"property": {
"type": "Text",
"span": {
"start": 26,
"end": 31,
"ctxt": 0
},
"value": "prop2",
"raw": "prop2"
},
"value": [
{
"type": "Text",
"span": {
"start": 33,
"end": 38,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
}
]
}
}
]
}

View File

@ -0,0 +1,109 @@
error: Stylesheet
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | / a {
2 | | prop1: value;
3 | | prop2: value;
4 | | }
| |__^
error: Rule
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | / a {
2 | | prop1: value;
3 | | prop2: value;
4 | | }
| |_^
error: StyleRule
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | / a {
2 | | prop1: value;
3 | | prop2: value;
4 | | }
| |_^
error: ComplexSelector
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: CompoundSelector
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: NamespacedName
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: Text
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: Block
--> $DIR/tests/fixture/declaration-list/input.css:1:3
|
1 | a {
| ___^
2 | | prop1: value;
3 | | prop2: value;
4 | | }
| |_^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:2:5
|
2 | prop1: value;
| ^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/declaration-list/input.css:2:5
|
2 | prop1: value;
| ^^^^^
error: Value
--> $DIR/tests/fixture/declaration-list/input.css:2:12
|
2 | prop1: value;
| ^^^^^
error: Text
--> $DIR/tests/fixture/declaration-list/input.css:2:12
|
2 | prop1: value;
| ^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:3:5
|
3 | prop2: value;
| ^^^^^^^^^^^^
error: Text
--> $DIR/tests/fixture/declaration-list/input.css:3:5
|
3 | prop2: value;
| ^^^^^
error: Value
--> $DIR/tests/fixture/declaration-list/input.css:3:12
|
3 | prop2: value;
| ^^^^^
error: Text
--> $DIR/tests/fixture/declaration-list/input.css:3:12
|
3 | prop2: value;
| ^^^^^

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 32,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 8,
"end": 29,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 8,
@ -80,7 +80,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "Text",
"span": {

View File

@ -46,7 +46,7 @@ error: Text
1 | a {
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/delim/backslash/input.css:1:3
|
1 | a {
@ -55,7 +55,7 @@ error: DeclBlock
3 | | }
| |_^
error: Property
error: Declaration
--> $DIR/tests/fixture/delim/backslash/input.css:2:5
|
2 | color: \\ red \\ blue;

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 131,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 8,
"end": 18,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 8,
@ -80,7 +80,7 @@
"value": "prop",
"raw": "prop"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -112,13 +112,13 @@
"important": null
},
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 24,
"end": 35,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 24,
@ -128,7 +128,7 @@
"value": "prop",
"raw": "prop"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -160,13 +160,13 @@
"important": null
},
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 41,
"end": 54,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 41,
@ -176,7 +176,7 @@
"value": "prop",
"raw": "prop"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -208,13 +208,13 @@
"important": null
},
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 60,
"end": 76,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 60,
@ -224,7 +224,7 @@
"value": "prop",
"raw": "prop"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -256,13 +256,13 @@
"important": null
},
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 82,
"end": 94,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 82,
@ -272,7 +272,7 @@
"value": "prop",
"raw": "prop"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -304,13 +304,13 @@
"important": null
},
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 100,
"end": 108,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 100,
@ -320,7 +320,7 @@
"value": "prop",
"raw": "prop"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {
@ -352,13 +352,13 @@
"important": null
},
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 114,
"end": 128,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 114,
@ -368,7 +368,7 @@
"value": "prop",
"raw": "prop"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {

View File

@ -58,7 +58,7 @@ error: Text
1 | a {
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/dimension/basic/input.css:1:3
|
1 | a {
@ -71,7 +71,7 @@ error: DeclBlock
9 | | }
| |_^
error: Property
error: Declaration
--> $DIR/tests/fixture/dimension/basic/input.css:2:5
|
2 | prop: 10px;
@ -107,7 +107,7 @@ error: Unit
2 | prop: 10px;
| ^^
error: Property
error: Declaration
--> $DIR/tests/fixture/dimension/basic/input.css:3:5
|
3 | prop: .10px;
@ -143,7 +143,7 @@ error: Unit
3 | prop: .10px;
| ^^
error: Property
error: Declaration
--> $DIR/tests/fixture/dimension/basic/input.css:4:5
|
4 | prop: 12.34px;
@ -179,7 +179,7 @@ error: Unit
4 | prop: 12.34px;
| ^^
error: Property
error: Declaration
--> $DIR/tests/fixture/dimension/basic/input.css:5:5
|
5 | prop: 0000.000px;
@ -215,7 +215,7 @@ error: Unit
5 | prop: 0000.000px;
| ^^
error: Property
error: Declaration
--> $DIR/tests/fixture/dimension/basic/input.css:6:5
|
6 | prop: 1px\\9;
@ -251,7 +251,7 @@ error: Unit
6 | prop: 1px\\9;
| ^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/dimension/basic/input.css:7:5
|
7 | prop: 1e;
@ -287,7 +287,7 @@ error: Unit
7 | prop: 1e;
| ^
error: Property
error: Declaration
--> $DIR/tests/fixture/dimension/basic/input.css:8:5
|
8 | prop: 1unknown;

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 20,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 18,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "HashValue",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { color: #112333 }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/-4j83DwgJa0nPQIjlb0RIA/input.css:1:3
|
1 | a { color: #112333 }
| ^^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/-4j83DwgJa0nPQIjlb0RIA/input.css:1:5
|
1 | a { color: #112333 }

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 4,
"end": 6,

View File

@ -40,7 +40,7 @@ error: Text
1 | \2d {}
| ^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/-8o_H6sq86TDAHqF7YO0hg/input.css:1:5
|
1 | \2d {}

View File

@ -197,7 +197,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 56,
"end": 67,
@ -205,13 +205,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 57,
"end": 66,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 57,
@ -221,7 +221,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "Text",
"span": {

View File

@ -132,13 +132,13 @@ error: Text
1 | div::before::after::selection::first-line::first-letter {color:red}
| ^^^^^^^^^^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/-GZJfOA9TK6La2KGGNgCkg/input.css:1:57
|
1 | div::before::after::selection::first-line::first-letter {color:red}
| ^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/-GZJfOA9TK6La2KGGNgCkg/input.css:1:58
|
1 | div::before::after::selection::first-line::first-letter {color:red}

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 18,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 15,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "width",
"raw": "width"
},
"values": [
"value": [
{
"type": "Number",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { width: +.10; }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/-JoxoRcnA-zaaEC7RjXKvQ/input.css:1:3
|
1 | a { width: +.10; }
| ^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/-JoxoRcnA-zaaEC7RjXKvQ/input.css:1:5
|
1 | a { width: +.10; }

View File

@ -57,7 +57,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 8,
"end": 10,

View File

@ -46,7 +46,7 @@ error: Text
1 | #h\61sh {}
| ^^^^^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/-b4VODLSeaV93gwC2Ot2tw/input.css:1:9
|
1 | #h\61sh {}

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 19,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 16,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "width",
"raw": "width"
},
"values": [
"value": [
{
"type": "PercentValue",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { width: -.10%; }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/-edvtxlXMemv5jnGeyueBA/input.css:1:3
|
1 | a { width: -.10%; }
| ^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/-edvtxlXMemv5jnGeyueBA/input.css:1:5
|
1 | a { width: -.10%; }

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 45,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 43,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "box-shadow",
"raw": "box-shadow"
},
"values": [
"value": [
{
"type": "FnValue",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { box-shadow: rgb(255, 0, 17) 0 0 1 inset }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/-gboAEi1zyjFW5mtEM24Rg/input.css:1:3
|
1 | a { box-shadow: rgb(255, 0, 17) 0 0 1 inset }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/-gboAEi1zyjFW5mtEM24Rg/input.css:1:5
|
1 | a { box-shadow: rgb(255, 0, 17) 0 0 1 inset }

View File

@ -78,7 +78,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 5,
"end": 7,

View File

@ -58,7 +58,7 @@ error: Text
1 | [*|b]{}
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/-shTP60AAG6a4mCJUpV1cQ/input.css:1:6
|
1 | [*|b]{}

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 21,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 19,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "margin",
"raw": "margin"
},
"values": [
"value": [
{
"type": "Number",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { margin: 0 1 0 1 }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/07tvJxvZrgDeTmptOclErA/input.css:1:3
|
1 | a { margin: 0 1 0 1 }
| ^^^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/07tvJxvZrgDeTmptOclErA/input.css:1:5
|
1 | a { margin: 0 1 0 1 }

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 20,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 18,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "value",
"raw": "value"
},
"values": [
"value": [
{
"type": "UnitValue",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { value: 10p\32x }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/0LKvnY2GhG7ss8EXa0t6tQ/input.css:1:3
|
1 | a { value: 10p\32x }
| ^^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/0LKvnY2GhG7ss8EXa0t6tQ/input.css:1:5
|
1 | a { value: 10p\32x }

View File

@ -78,7 +78,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 9,
"end": 11,

View File

@ -58,7 +58,7 @@ error: Str
1 | [b="0c"] {}
| ^^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/0Zlgi2sdsFfTrdnWOHUqeg/input.css:1:10
|
1 | [b="0c"] {}

View File

@ -57,7 +57,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 4,
"end": 6,

View File

@ -46,7 +46,7 @@ error: Text
1 | #id {}
| ^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/0qqdP6EmNqzSa3h8c8lYUQ/input.css:1:5
|
1 | #id {}

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 5,
"end": 7,

View File

@ -40,7 +40,7 @@ error: Text
1 | -\2d {}
| ^^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/0yo6flt6jo-UA8rUEFjrWA/input.css:1:6
|
1 | -\2d {}

View File

@ -75,7 +75,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 7,
"end": 9,

View File

@ -58,7 +58,7 @@ error: Text
1 | div#id {}
| ^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/10VLLYwNo7xaTisP9r9Kfg/input.css:1:8
|
1 | div#id {}

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 59,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 26,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "border-radius",
"raw": "border-radius"
},
"values": [
"value": [
{
"type": "Number",
"span": {
@ -125,13 +125,13 @@
"important": null
},
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 28,
"end": 56,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 28,
@ -141,7 +141,7 @@
"value": "border-top-right-radius",
"raw": "border-top-right-radius"
},
"values": [
"value": [
{
"type": "Number",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/input.css:1:3
|
1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/input.css:1:5
|
1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; }
@ -106,7 +106,7 @@ error: Num
1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; }
| ^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/12EwJCu6DsfOEJubQW9jLg/input.css:1:29
|
1 | a { border-radius: 1 2 3 4; border-top-right-radius: 5 6; }

View File

@ -57,7 +57,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 6,
"end": 8,

View File

@ -46,7 +46,7 @@ error: Text
1 | #-\2d {}
| ^^^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/1JQzQJ1QtQJ1onUzZx7BVg/input.css:1:7
|
1 | #-\2d {}

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 20,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 18,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "value",
"raw": "value"
},
"values": [
"value": [
{
"type": "Text",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { value: id\65nt }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/1naykwaIKZc6zuHRNIccLQ/input.css:1:3
|
1 | a { value: id\65nt }
| ^^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/1naykwaIKZc6zuHRNIccLQ/input.css:1:5
|
1 | a { value: id\65nt }

View File

@ -85,7 +85,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 8,
"end": 27,
@ -93,13 +93,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 10,
"end": 25,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 10,
@ -109,7 +109,7 @@
"value": "content",
"raw": "content"
},
"values": [
"value": [
{
"type": "String",
"span": {

View File

@ -60,13 +60,13 @@ error: Text
error: Tokens
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/2nNBhRWO2cNcBJf09zDxjw/input.css:1:9
|
1 | a:after { content: 'a\ b' }
| ^^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/2nNBhRWO2cNcBJf09zDxjw/input.css:1:11
|
1 | a:after { content: 'a\ b' }

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 19,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 17,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "value",
"raw": "value"
},
"values": [
"value": [
{
"type": "FnValue",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { value: \66n() }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/36qnNuIUvbIrMnJKDxwE5A/input.css:1:3
|
1 | a { value: \66n() }
| ^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/36qnNuIUvbIrMnJKDxwE5A/input.css:1:5
|
1 | a { value: \66n() }

View File

@ -43,7 +43,7 @@
}
],
"rule": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 23,
"end": 37,
@ -51,13 +51,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 25,
"end": 35,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 25,
@ -67,7 +67,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "Text",
"span": {
@ -103,7 +103,7 @@
}
],
"rule": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 41,
"end": 43,

View File

@ -52,13 +52,13 @@ error: KeyframeBlockRule
1 | @keyframes test { from { color: red } to {} }
| ^^^^^^^^^^^^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/375WZQg3bngUbuoHsqEIcA/input.css:1:24
|
1 | @keyframes test { from { color: red } to {} }
| ^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/375WZQg3bngUbuoHsqEIcA/input.css:1:26
|
1 | @keyframes test { from { color: red } to {} }
@ -106,7 +106,7 @@ error: KeyframeBlockRule
1 | @keyframes test { from { color: red } to {} }
| ^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/375WZQg3bngUbuoHsqEIcA/input.css:1:42
|
1 | @keyframes test { from { color: red } to {} }

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 18,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 16,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "HashValue",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { color: #ABCD }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/input.css:1:3
|
1 | a { color: #ABCD }
| ^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/input.css:1:5
|
1 | a { color: #ABCD }

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 22,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 20,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "HashValue",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { color: #ABBBCCDD }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/input.css:1:3
|
1 | a { color: #ABBBCCDD }
| ^^^^^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/input.css:1:5
|
1 | a { color: #ABBBCCDD }

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 18,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 16,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "HashValue",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { color: #abcf }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/3JGye8AhworwNFoUL1gKbg/input.css:1:3
|
1 | a { color: #abcf }
| ^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/3JGye8AhworwNFoUL1gKbg/input.css:1:5
|
1 | a { color: #abcf }

View File

@ -56,7 +56,7 @@
}
],
"block": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 2,
"end": 18,
@ -64,13 +64,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 4,
"end": 15,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 4,
@ -80,7 +80,7 @@
"value": "width",
"raw": "width"
},
"values": [
"value": [
{
"type": "PercentValue",
"span": {

View File

@ -40,13 +40,13 @@ error: Text
1 | a { width: 0.1%; }
| ^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/3OV2jH0hrt2_2jOv6t4wvA/input.css:1:3
|
1 | a { width: 0.1%; }
| ^^^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/3OV2jH0hrt2_2jOv6t4wvA/input.css:1:5
|
1 | a { width: 0.1%; }

View File

@ -51,7 +51,7 @@
}
],
"rule": {
"type": "DeclBlock",
"type": "Block",
"span": {
"start": 23,
"end": 37,
@ -59,13 +59,13 @@
},
"items": [
{
"type": "Property",
"type": "Declaration",
"span": {
"start": 25,
"end": 35,
"ctxt": 0
},
"name": {
"property": {
"type": "Text",
"span": {
"start": 25,
@ -75,7 +75,7 @@
"value": "color",
"raw": "color"
},
"values": [
"value": [
{
"type": "Text",
"span": {

View File

@ -58,13 +58,13 @@ error: KeyframeBlockRule
1 | @keyframes name { 100% { color: red } }
| ^^^^^^^^^^^^^^
error: DeclBlock
error: Block
--> $DIR/tests/fixture/esbuild/misc/3a1KXFwtncypOUCwQI7IAw/input.css:1:24
|
1 | @keyframes name { 100% { color: red } }
| ^^^^^^^^^^^^^^
error: Property
error: Declaration
--> $DIR/tests/fixture/esbuild/misc/3a1KXFwtncypOUCwQI7IAw/input.css:1:26
|
1 | @keyframes name { 100% { color: red } }

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