Files
9d83672fc7 Caret topic (pipe operator) (#13749)
* parser: Add caret as topic reference (tests)

* parser: Add caret as topic reference (implement)

* generator: Avoid reconstructing validTopicTokenSet

* babel-parser: Remove redundant throws in expression.js

* Minimize diff

* Update error message

Co-authored-by: Nicolò Ribaudo <[email protected]>
2021-10-28 16:04:55 -04:00

21 lines
246 B
JavaScript

const result = 1
|> class {
#baz;
constructor () {
this.#baz = ^;
}
#bar () {
return this.#baz + 2;
}
foo () {
return this.#bar() + 3;
}
}
|> new ^
|> ^.foo();
expect(result).toBe(1 + 2 + 3);