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

Function onattribnameend

packages/compiler-core/src/parser.ts:296–310  ·  view source on GitHub ↗
(end)

Source from the content-addressed store, hash-verified

294 },
295
296 onattribnameend(end) {
297 const start = currentProp!.loc.start.offset
298 const name = getSlice(start, end)
299 if (currentProp!.type === NodeTypes.DIRECTIVE) {
300 currentProp!.rawName = name
301 }
302 // check duplicate attrs
303 if (
304 currentOpenTag!.props.some(
305 p => (p.type === NodeTypes.DIRECTIVE ? p.rawName : p.name) === name,
306 )
307 ) {
308 emitError(ErrorCodes.DUPLICATE_ATTRIBUTE, start)
309 }
310 },
311
312 onattribend(quote, end) {
313 if (currentOpenTag && currentProp) {

Callers

nothing calls this directly

Calls 3

getSliceFunction · 0.85
emitErrorFunction · 0.85
someMethod · 0.80

Tested by

no test coverage detected