1 | Object.defineProperty(exports, "__esModule", {value: true});
; |
2 | var _types = require('../parser/tokenizer/types');
|
3 |
|
4 | /**
|
5 | * Get all identifier names in the code, in order, including duplicates.
|
6 | */
|
7 | function getIdentifierNames(code, tokens) {
|
8 | const names = [];
|
9 | for (const token of tokens) {
|
10 | if (token.type === _types.TokenType.name) {
|
11 | names.push(code.slice(token.start, token.end));
|
12 | }
|
13 | }
|
14 | return names;
|
15 | } exports.default = getIdentifierNames;
|