Fix some parsing edge cases for :: operator.
This commit is contained in:
parent
fd8e94a90f
commit
e05d7cf49a
@ -214,7 +214,7 @@ pp.parseExprSubscripts = function(refShorthandDefaultPos) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pp.parseSubscripts = function(base, start, noCalls) {
|
pp.parseSubscripts = function(base, start, noCalls) {
|
||||||
if (this.eat(tt.doubleColon)) {
|
if (!noCalls && this.eat(tt.doubleColon)) {
|
||||||
let node = this.startNodeAt(start)
|
let node = this.startNodeAt(start)
|
||||||
node.object = base
|
node.object = base
|
||||||
node.callee = this.parseNoCallExpr()
|
node.callee = this.parseNoCallExpr()
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
var f = ctx::ns.obj.func;
|
var f = ctx::ns.obj.func;
|
||||||
var g = ::ns.obj.func;
|
var g = ::ns.obj.func;
|
||||||
|
var h = new X::y;
|
||||||
|
|||||||
@ -4,3 +4,4 @@ var _context;
|
|||||||
|
|
||||||
var f = (_context = ctx, ns.obj.func).bind(_context);
|
var f = (_context = ctx, ns.obj.func).bind(_context);
|
||||||
var g = (_context = ns.obj).func.bind(_context);
|
var g = (_context = ns.obj).func.bind(_context);
|
||||||
|
var h = (_context = new X(), y).bind(_context);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user