Fix feature builds.

This commit is contained in:
Stephen Chung 2022-09-25 23:07:47 +08:00
parent bf02d040e2
commit e9a270f6ba

View File

@ -874,9 +874,9 @@ impl Token {
"**=" => PowerOfAssign, "**=" => PowerOfAssign,
#[cfg(feature = "no_object")] #[cfg(feature = "no_object")]
"?." => Reserved(syntax.into()), "?." => Reserved(Box::new(syntax.into())),
#[cfg(feature = "no_index")] #[cfg(feature = "no_index")]
"?[" => Reserved(syntax.into()), "?[" => Reserved(Box::new(syntax.into())),
#[cfg(not(feature = "no_function"))] #[cfg(not(feature = "no_function"))]
"fn" => Fn, "fn" => Fn,
@ -884,7 +884,7 @@ impl Token {
"private" => Private, "private" => Private,
#[cfg(feature = "no_function")] #[cfg(feature = "no_function")]
"fn" | "private" => Reserved(syntax.into()), "fn" | "private" => Reserved(Box::new(syntax.into())),
#[cfg(not(feature = "no_module"))] #[cfg(not(feature = "no_module"))]
"import" => Import, "import" => Import,
@ -894,7 +894,7 @@ impl Token {
"as" => As, "as" => As,
#[cfg(feature = "no_module")] #[cfg(feature = "no_module")]
"import" | "export" | "as" => Reserved(syntax.into()), "import" | "export" | "as" => Reserved(Box::new(syntax.into())),
// List of reserved operators // List of reserved operators
"===" | "!==" | "->" | "<-" | "?" | ":=" | ":;" | "~" | "!." | "::<" | "(*" | "*)" "===" | "!==" | "->" | "<-" | "?" | ":=" | ":;" | "~" | "!." | "::<" | "(*" | "*)"