refactor(compiler-core): use directive name in error code identifier (#163)
This commit is contained in:
@@ -46,7 +46,7 @@ export const transformIf = createStructuralDirectiveTransform(
|
||||
) {
|
||||
const loc = dir.exp ? dir.exp.loc : node.loc
|
||||
context.onError(
|
||||
createCompilerError(ErrorCodes.X_IF_NO_EXPRESSION, dir.loc)
|
||||
createCompilerError(ErrorCodes.X_V_IF_NO_EXPRESSION, dir.loc)
|
||||
)
|
||||
dir.exp = createSimpleExpression(`true`, false, loc)
|
||||
}
|
||||
@@ -125,7 +125,7 @@ export const transformIf = createStructuralDirectiveTransform(
|
||||
}
|
||||
} else {
|
||||
context.onError(
|
||||
createCompilerError(ErrorCodes.X_ELSE_NO_ADJACENT_IF, node.loc)
|
||||
createCompilerError(ErrorCodes.X_V_ELSE_NO_ADJACENT_IF, node.loc)
|
||||
)
|
||||
}
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user