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

Method parse

packages/compiler-sfc/src/script/context.ts:108–124  ·  view source on GitHub ↗
(input: string, offset: number)

Source from the content-addressed store, hash-verified

106 )
107
108 function parse(input: string, offset: number): Program {
109 try {
110 return babelParse(input, {
111 plugins,
112 sourceType: 'module',
113 }).program
114 } catch (e: any) {
115 e.message = `[vue/compiler-sfc] ${e.message}\n\n${
116 descriptor.filename
117 }\n${generateCodeFrame(
118 descriptor.source,
119 e.pos + offset,
120 e.pos + offset + 1,
121 )}`
122 throw e
123 }
124 }
125
126 this.scriptAst =
127 descriptor.script &&

Callers

nothing calls this directly

Calls 1

generateCodeFrameFunction · 0.90

Tested by

no test coverage detected