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:
@ -756,10 +756,7 @@ export const ModelingMachineProvider = ({
|
||||
let isIdentifierUsed = false
|
||||
traverse(newAst, {
|
||||
enter: (node) => {
|
||||
if (
|
||||
node.type === 'Identifier' &&
|
||||
node.name === variableName
|
||||
) {
|
||||
if (node.type === 'Name' && node.name.name === variableName) {
|
||||
isIdentifierUsed = true
|
||||
}
|
||||
},
|
||||
@ -1698,8 +1695,8 @@ export const ModelingMachineProvider = ({
|
||||
lastInPipe &&
|
||||
Number(pathToProfile[1][0]) === indexToDelete &&
|
||||
lastInPipe.type === 'CallExpression' &&
|
||||
lastInPipe.callee.type === 'Identifier' &&
|
||||
lastInPipe.callee.name === 'arcTo'
|
||||
lastInPipe.callee.type === 'Name' &&
|
||||
lastInPipe.callee.name.name === 'arcTo'
|
||||
) {
|
||||
isLastInPipeThreePointArc = true
|
||||
pipe.node.body = pipe.node.body.slice(0, -1)
|
||||
|
Reference in New Issue
Block a user