mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 17:54:15 +03:00
refactor(css/parser): Remove parse_values
, which is not used (#3552)
This commit is contained in:
parent
de26b88ff6
commit
d5aee470cb
@ -36,7 +36,6 @@ fn run(input: &Path, minify: bool) {
|
||||
let mut stylesheet: Stylesheet = parse_file(
|
||||
&fm,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
..Default::default()
|
||||
},
|
||||
&mut errors,
|
||||
@ -72,7 +71,6 @@ fn run(input: &Path, minify: bool) {
|
||||
let mut stylesheet_output: Stylesheet = parse_file(
|
||||
&fm_output,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
..Default::default()
|
||||
},
|
||||
&mut errors,
|
||||
@ -156,7 +154,6 @@ fn parse_again(input: PathBuf) {
|
||||
let mut stylesheet: Stylesheet = parse_file(
|
||||
&fm,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
..Default::default()
|
||||
},
|
||||
&mut errors,
|
||||
@ -184,7 +181,6 @@ fn parse_again(input: PathBuf) {
|
||||
let mut parsed: Stylesheet = parse_file(
|
||||
&new_fm,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
..Default::default()
|
||||
},
|
||||
&mut parsed_errors,
|
||||
|
@ -21,8 +21,6 @@ pub type PResult<T> = Result<T, Error>;
|
||||
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct ParserConfig {
|
||||
pub parse_values: bool,
|
||||
|
||||
/// If this is `true`, **wrong** comments starting with `//` will be treated
|
||||
/// as a comment.
|
||||
///
|
||||
|
@ -40,8 +40,6 @@ fn tokens_input(input: PathBuf) {
|
||||
let _ss: Stylesheet = parse_tokens(
|
||||
&tokens,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
|
||||
..Default::default()
|
||||
},
|
||||
&mut errors,
|
||||
@ -106,8 +104,6 @@ fn test_pass(input: PathBuf, config: ParserConfig) {
|
||||
let ss_tok: Stylesheet = parse_tokens(
|
||||
&tokens,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
|
||||
..Default::default()
|
||||
},
|
||||
&mut errors,
|
||||
@ -145,7 +141,6 @@ fn pass(input: PathBuf) {
|
||||
test_pass(
|
||||
input,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
..Default::default()
|
||||
},
|
||||
)
|
||||
@ -156,7 +151,6 @@ fn line_comments(input: PathBuf) {
|
||||
test_pass(
|
||||
input,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
allow_wrong_line_comments: true,
|
||||
..Default::default()
|
||||
},
|
||||
@ -178,7 +172,6 @@ fn recovery(input: PathBuf) {
|
||||
let ref_json_path = input.parent().unwrap().join("output.json");
|
||||
|
||||
let config = ParserConfig {
|
||||
parse_values: true,
|
||||
allow_wrong_line_comments: false,
|
||||
};
|
||||
let fm = cm.load_file(&input).unwrap();
|
||||
@ -222,7 +215,6 @@ fn recovery(input: PathBuf) {
|
||||
let ss_tok: Stylesheet = parse_tokens(
|
||||
&tokens,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
..Default::default()
|
||||
},
|
||||
&mut errors,
|
||||
@ -539,7 +531,6 @@ fn span(input: PathBuf) {
|
||||
}
|
||||
|
||||
let config = ParserConfig {
|
||||
parse_values: true,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@ -578,8 +569,6 @@ fn fail(input: PathBuf) {
|
||||
|
||||
let stderr = testing::run_test2(false, |cm, handler| -> Result<(), _> {
|
||||
let config = ParserConfig {
|
||||
parse_values: true,
|
||||
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
|
@ -489,7 +489,6 @@ fn t(src: &str, expected: &str) {
|
||||
let props: Vec<DeclarationBlockItem> = parse_file(
|
||||
&fm,
|
||||
ParserConfig {
|
||||
parse_values: true,
|
||||
..Default::default()
|
||||
},
|
||||
&mut errors,
|
||||
|
Loading…
Reference in New Issue
Block a user