simplify and improve the example for getLaterBaseAccess

This commit is contained in:
erik-krogh
2022-09-22 15:57:40 +02:00
parent fedf8fc575
commit 5fb44e9dd8

View File

@@ -275,11 +275,11 @@ module AccessPath {
*
* This allows `fromRhs` to compute an access path for e.g. the below example:
* ```JavaScript
* function Template(text, opts) {
* opts = opts || {};
* var options = {};
* options.varName = taint;
* this.opts = options; // this.opts.varName is now available
* function foo(x) {
* var obj = {
* bar: x // `x` has the access path "foo.bar" starting from the root `this`.
* };
* this.foo = obj;
* }
* ```
*/