Move PipelineStyle to types.js file
This commit is contained in:
parent
b593af17a9
commit
a0e94ec24d
@ -2071,7 +2071,7 @@ export default class ExpressionParser extends LValParser {
|
||||
|
||||
checkSmartPipelineBodyEarlyErrors(
|
||||
childExpression: N.Expression,
|
||||
pipelineStyle: PipelineStyle,
|
||||
pipelineStyle: N.PipelineStyle,
|
||||
startPos: number,
|
||||
): void {
|
||||
if (this.match(tt.arrow)) {
|
||||
@ -2094,7 +2094,7 @@ export default class ExpressionParser extends LValParser {
|
||||
|
||||
parseSmartPipelineBodyInStyle(
|
||||
childExpression: N.Expression,
|
||||
pipelineStyle: PipelineStyle,
|
||||
pipelineStyle: N.PipelineStyle,
|
||||
startPos: number,
|
||||
startLoc: Position,
|
||||
): N.PipelineBody {
|
||||
@ -2124,7 +2124,7 @@ export default class ExpressionParser extends LValParser {
|
||||
return this.finishNode(bodyNode, pipelineStyle);
|
||||
}
|
||||
|
||||
checkSmartPipelineBodyStyle(expression: N.Expression): PipelineStyle {
|
||||
checkSmartPipelineBodyStyle(expression: N.Expression): N.PipelineStyle {
|
||||
switch (expression.type) {
|
||||
default:
|
||||
return this.isSimpleReference(expression)
|
||||
@ -2208,9 +2208,3 @@ export default class ExpressionParser extends LValParser {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
type PipelineStyle =
|
||||
| "PipelineBareFunction"
|
||||
| "PipelineBareConstructor"
|
||||
| "PipelineBareAwaitedFunction"
|
||||
| "PipelineTopicExpression";
|
||||
|
||||
@ -592,6 +592,12 @@ export type PipelineTopicBody = NodeBase & {
|
||||
expression: Expression,
|
||||
};
|
||||
|
||||
export type PipelineStyle =
|
||||
| "PipelineBareFunction"
|
||||
| "PipelineBareConstructor"
|
||||
| "PipelineBareAwaitedFunction"
|
||||
| "PipelineTopicExpression";
|
||||
|
||||
// Template Literals
|
||||
|
||||
export type TemplateLiteral = NodeBase & {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user