persona-community-5/.pnpm-store/v3/files/f2/ef6c13fcce99e6d9bad21b6430948a28c0ab691e22bafc62e85167d40e1405640db3ab447c40666f5a24cd421fb746bf50227361e9b8c1a56fb97a14ac5e16
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

16 lines
369 B
Plaintext

import {TokenType as tt} from "../parser/tokenizer/types";
/**
* Get all identifier names in the code, in order, including duplicates.
*/
export default function getIdentifierNames(code, tokens) {
const names = [];
for (const token of tokens) {
if (token.type === tt.name) {
names.push(code.slice(token.start, token.end));
}
}
return names;
}