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

Method stateInAttrValueNoQuotes

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

Source from the content-addressed store, hash-verified

822 this.handleInAttrValue(c, CharCodes.SingleQuote)
823 }
824 private stateInAttrValueNoQuotes(c: number): void {
825 if (isWhitespace(c) || c === CharCodes.Gt) {
826 this.cbs.onattribdata(this.sectionStart, this.index)
827 this.sectionStart = -1
828 this.cbs.onattribend(QuoteType.Unquoted, this.index)
829 this.state = State.BeforeAttrName
830 this.stateBeforeAttrName(c)
831 } else if (
832 ((__DEV__ || !__BROWSER__) && c === CharCodes.DoubleQuote) ||
833 c === CharCodes.SingleQuote ||
834 c === CharCodes.Lt ||
835 c === CharCodes.Eq ||
836 c === CharCodes.GraveAccent
837 ) {
838 this.cbs.onerr(
839 ErrorCodes.UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE,
840 this.index,
841 )
842 } else if (!__BROWSER__ && c === CharCodes.Amp) {
843 this.startEntity()
844 }
845 }
846 private stateBeforeDeclaration(c: number): void {
847 if (c === CharCodes.LeftSquare) {
848 this.state = State.CDATASequence

Callers 2

stateBeforeAttrValueMethod · 0.95
parseMethod · 0.95

Calls 6

stateBeforeAttrNameMethod · 0.95
startEntityMethod · 0.95
isWhitespaceFunction · 0.85
onattribdataMethod · 0.80
onattribendMethod · 0.80
onerrMethod · 0.80

Tested by

no test coverage detected