Lines Matching refs:prop
30 pp.checkPropClash = function(prop, propHash) { argument
31 if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
33 let {key} = prop, name
39 let {kind} = prop
525 let prop = this.startNode(), isGenerator, isAsync, startPos, startLoc
527 prop.method = false
528 prop.shorthand = false
536 this.parsePropertyName(prop)
537 if (!isPattern && this.options.ecmaVersion >= 8 && !isGenerator && !prop.computed &&
538 prop.key.type === "Identifier" && prop.key.name === "async" && this.type !== tt.parenL &&
541 this.parsePropertyName(prop, refDestructuringErrors)
545 …this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructurin…
546 this.checkPropClash(prop, propHash)
547 node.properties.push(this.finishNode(prop, "Property"))
552 pp.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDest… argument
557 …prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign…
558 prop.kind = "init"
561 prop.kind = "init"
562 prop.method = true
563 prop.value = this.parseMethod(isGenerator, isAsync)
564 } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
565 (prop.key.name === "get" || prop.key.name === "set") &&
568 prop.kind = prop.key.name
569 this.parsePropertyName(prop)
570 prop.value = this.parseMethod(false)
571 let paramCount = prop.kind === "get" ? 0 : 1
572 if (prop.value.params.length !== paramCount) {
573 let start = prop.value.start
574 if (prop.kind === "get")
579 if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
580 this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
582 } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
583 if (this.keywords.test(prop.key.name) ||
584 (this.strict ? this.reservedWordsStrict : this.reservedWords).test(prop.key.name) ||
585 (this.inGenerator && prop.key.name == "yield") ||
586 (this.inAsync && prop.key.name == "await"))
587 …this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand proper…
588 prop.kind = "init"
590 prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
594 prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
596 prop.value = prop.key
598 prop.shorthand = true
602 pp.parsePropertyName = function(prop) { argument
605 prop.computed = true
606 prop.key = this.parseMaybeAssign()
608 return prop.key
610 prop.computed = false
613 …return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.pa…