Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(css/parser): avoid skipping extra whitespaces #6592

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 0 additions & 26 deletions crates/swc_css_parser/src/parser/macros.rs
Expand Up @@ -43,28 +43,6 @@ macro_rules! tok_pat {
};
}

macro_rules! can_ignore_ws {
("{") => {
true
};
("}") => {
true
};
("(") => {
true
};
(")") => {
true
};
(":") => {
true
};

($tt:tt) => {
false
};
}

macro_rules! cur {
($parser:expr) => {
match $parser.input.cur() {
Expand Down Expand Up @@ -182,10 +160,6 @@ macro_rules! eat {

macro_rules! expect {
($parser:expr, $tt:tt) => {
if can_ignore_ws!($tt) {
$parser.input.skip_ws()
}

if !eat!($parser, $tt) {
let span = $parser.input.cur_span();
return Err(crate::error::Error::new(
Expand Down