MCPcopy
hub / github.com/vuejs/core / handleAttrStart

Method handleAttrStart

packages/compiler-core/src/tokenizer.ts:679–696  ·  view source on GitHub ↗
(c: number)

Source from the content-addressed store, hash-verified

677 }
678 }
679 private handleAttrStart(c: number) {
680 if (c === CharCodes.LowerV && this.peek() === CharCodes.Dash) {
681 this.state = State.InDirName
682 this.sectionStart = this.index
683 } else if (
684 c === CharCodes.Dot ||
685 c === CharCodes.Colon ||
686 c === CharCodes.At ||
687 c === CharCodes.Number
688 ) {
689 this.cbs.ondirname(this.index, this.index + 1)
690 this.state = State.InDirArg
691 this.sectionStart = this.index + 1
692 } else {
693 this.state = State.InAttrName
694 this.sectionStart = this.index
695 }
696 }
697 private stateInSelfClosingTag(c: number): void {
698 if (c === CharCodes.Gt) {
699 this.cbs.onselfclosingtag(this.index)

Callers 2

stateBeforeAttrNameMethod · 0.95
stateAfterAttrNameMethod · 0.95

Calls 2

peekMethod · 0.95
ondirnameMethod · 0.80

Tested by

no test coverage detected