persona-community-5/.pnpm-store/v3/files/e1/53edfa2d02da1619ae44e7f66d7e32eaad229598bc3cad50746aeb6dd7db3e77cfd68ffb9adab0da3b9a000beab4aba2dd0795095b087b7e2d30d76cf8c5be
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

30 lines
627 B
Plaintext

import {TokenType as tt} from "../parser/tokenizer/types";
export default function elideImportEquals(tokens) {
// import
tokens.removeInitialToken();
// name
tokens.removeToken();
// =
tokens.removeToken();
// name or require
tokens.removeToken();
// Handle either `import A = require('A')` or `import A = B.C.D`.
if (tokens.matches1(tt.parenL)) {
// (
tokens.removeToken();
// path string
tokens.removeToken();
// )
tokens.removeToken();
} else {
while (tokens.matches1(tt.dot)) {
// .
tokens.removeToken();
// name
tokens.removeToken();
}
}
}