Updated node modules

This commit is contained in:
2023-07-15 17:06:30 -05:00
parent 7ef1139ef8
commit 92b3795e10
2280 changed files with 319169 additions and 179621 deletions

View File

@@ -0,0 +1,19 @@
import {ContextualKeyword} from "../parser/tokenizer/keywords";
import {TokenType as tt} from "../parser/tokenizer/types";
/**
* Starting at a potential `assert` token remove the import assertion if there
* is one.
*/
export function removeMaybeImportAssertion(tokens) {
if (tokens.matches2(tt.name, tt.braceL) && tokens.matchesContextual(ContextualKeyword._assert)) {
// assert
tokens.removeToken();
// {
tokens.removeToken();
tokens.removeBalancedCode();
// }
tokens.removeToken();
}
}