-
Notifications
You must be signed in to change notification settings - Fork 55
Adds ability to find the expressionChainRoot
#1517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Hey there! I just built a new temporary npm package based on c9ae549. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.69.10-get-root-expression.20250613225719.tgz |
|
Hey there! I just built a new temporary npm package based on 1a29e3a. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.69.10-get-root-expression.20250613225725.tgz |
|
Hey there! I just built a new temporary npm package based on b5a5edb. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.69.12-get-root-expression.20250725180450.tgz |
|
Hey there! I just built a new temporary npm package based on ccab965. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.69.13-get-root-expression.20250808160510.tgz |
|
Hey there! I just built a new temporary npm package based on 2b5138e. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.70.0-get-root-expression.20250812191928.tgz |
|
Hey there! I just built a new temporary npm package based on cea083c. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.70.0-get-root-expression.20250813125649.tgz |
Sometimes plugins need to find the expression at the top of the current chain. For example,
doSomething(alpha.beta.charlie)is represented in code asSo we want the outer
charlieDottedGetExpression because that's the one that is directly held by any parent statement. But in order to detect this, we need to understand ast boundaries, because.parentisn't enough since there's no notion of expression boundaries.This PR solves that, by providing a
.getExpressionChainRoot()function to find the root, or.isExpressionChainRootproperty on the node.