Support paths to names rather than just raw idents (#5778)
* Support paths to names rather than just raw idents Signed-off-by: Nick Cameron <nrc@ncameron.org> * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -3,11 +3,20 @@ import { getIdentifiersInProgram } from './getIndentifiersInProgram'
|
||||
|
||||
function identifier(name: string, start: number, end: number) {
|
||||
return {
|
||||
type: 'Identifier',
|
||||
name,
|
||||
type: 'Name',
|
||||
start,
|
||||
end,
|
||||
commentStart: start,
|
||||
|
||||
abs_path: false,
|
||||
path: [],
|
||||
name: {
|
||||
start,
|
||||
end,
|
||||
commentStart: start,
|
||||
type: 'Identifier',
|
||||
name,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user