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

Function getLoc

packages/compiler-core/src/parser.ts:916–924  ·  view source on GitHub ↗
(start: number, end?: number)

Source from the content-addressed store, hash-verified

914}
915
916function getLoc(start: number, end?: number): SourceLocation {
917 return {
918 start: tokenizer.getPos(start),
919 // @ts-expect-error allow late attachment
920 end: end == null ? end : tokenizer.getPos(end),
921 // @ts-expect-error allow late attachment
922 source: end == null ? end : getSlice(start, end),
923 }
924}
925
926export function cloneLoc(loc: SourceLocation): SourceLocation {
927 return getLoc(loc.start.offset, loc.end.offset)

Callers 15

oninterpolationFunction · 0.85
onopentagnameFunction · 0.85
onattribnameFunction · 0.85
ondirnameFunction · 0.85
ondirargFunction · 0.85
ondirmodifierFunction · 0.85
onattribendFunction · 0.85
oncommentFunction · 0.85
createAliasExpressionFunction · 0.85
endOpenTagFunction · 0.85
onTextFunction · 0.85
cloneLocFunction · 0.85

Calls 2

getSliceFunction · 0.85
getPosMethod · 0.80

Tested by

no test coverage detected