Remove annotations from non-code-meta and store them in nodes (#5360)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -278,7 +278,7 @@ export function mutateObjExpProp(
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -891,7 +891,7 @@ export function createLiteral(value: LiteralValue | number): Node<Literal> {
|
||||
moduleId: 0,
|
||||
value,
|
||||
raw,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
}
|
||||
}
|
||||
|
||||
@ -901,7 +901,7 @@ export function createTagDeclarator(value: string): Node<TagDeclarator> {
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
value,
|
||||
}
|
||||
@ -913,7 +913,7 @@ export function createIdentifier(name: string): Node<Identifier> {
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
name,
|
||||
}
|
||||
@ -925,7 +925,7 @@ export function createPipeSubstitution(): Node<PipeSubstitution> {
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
}
|
||||
}
|
||||
|
||||
@ -938,13 +938,13 @@ export function createCallExpressionStdLib(
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
callee: {
|
||||
type: 'Identifier',
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
name,
|
||||
},
|
||||
@ -962,13 +962,13 @@ export function createCallExpressionStdLibKw(
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
callee: {
|
||||
type: 'Identifier',
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
name,
|
||||
},
|
||||
@ -986,13 +986,13 @@ export function createCallExpression(
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
callee: {
|
||||
type: 'Identifier',
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
name,
|
||||
},
|
||||
@ -1008,7 +1008,7 @@ export function createArrayExpression(
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
nonCodeMeta: nonCodeMetaEmpty(),
|
||||
elements,
|
||||
@ -1023,7 +1023,7 @@ export function createPipeExpression(
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
body,
|
||||
nonCodeMeta: nonCodeMetaEmpty(),
|
||||
@ -1041,14 +1041,14 @@ export function createVariableDeclaration(
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
declaration: {
|
||||
type: 'VariableDeclarator',
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
id: createIdentifier(varName),
|
||||
init,
|
||||
@ -1066,7 +1066,7 @@ export function createObjectExpression(properties: {
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
nonCodeMeta: nonCodeMetaEmpty(),
|
||||
properties: Object.entries(properties).map(([key, value]) => ({
|
||||
@ -1074,7 +1074,7 @@ export function createObjectExpression(properties: {
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
key: createIdentifier(key),
|
||||
|
||||
value,
|
||||
@ -1091,7 +1091,7 @@ export function createUnaryExpression(
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
operator,
|
||||
argument,
|
||||
@ -1108,7 +1108,7 @@ export function createBinaryExpression([left, operator, right]: [
|
||||
start: 0,
|
||||
end: 0,
|
||||
moduleId: 0,
|
||||
trivia: [],
|
||||
outerAttrs: [],
|
||||
|
||||
operator,
|
||||
left,
|
||||
|
Reference in New Issue
Block a user