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(
|
checkSmartPipelineBodyEarlyErrors(
|
||||||
childExpression: N.Expression,
|
childExpression: N.Expression,
|
||||||
pipelineStyle: PipelineStyle,
|
pipelineStyle: N.PipelineStyle,
|
||||||
startPos: number,
|
startPos: number,
|
||||||
): void {
|
): void {
|
||||||
if (this.match(tt.arrow)) {
|
if (this.match(tt.arrow)) {
|
||||||
@ -2094,7 +2094,7 @@ export default class ExpressionParser extends LValParser {
|
|||||||
|
|
||||||
parseSmartPipelineBodyInStyle(
|
parseSmartPipelineBodyInStyle(
|
||||||
childExpression: N.Expression,
|
childExpression: N.Expression,
|
||||||
pipelineStyle: PipelineStyle,
|
pipelineStyle: N.PipelineStyle,
|
||||||
startPos: number,
|
startPos: number,
|
||||||
startLoc: Position,
|
startLoc: Position,
|
||||||
): N.PipelineBody {
|
): N.PipelineBody {
|
||||||
@ -2124,7 +2124,7 @@ export default class ExpressionParser extends LValParser {
|
|||||||
return this.finishNode(bodyNode, pipelineStyle);
|
return this.finishNode(bodyNode, pipelineStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkSmartPipelineBodyStyle(expression: N.Expression): PipelineStyle {
|
checkSmartPipelineBodyStyle(expression: N.Expression): N.PipelineStyle {
|
||||||
switch (expression.type) {
|
switch (expression.type) {
|
||||||
default:
|
default:
|
||||||
return this.isSimpleReference(expression)
|
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,
|
expression: Expression,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type PipelineStyle =
|
||||||
|
| "PipelineBareFunction"
|
||||||
|
| "PipelineBareConstructor"
|
||||||
|
| "PipelineBareAwaitedFunction"
|
||||||
|
| "PipelineTopicExpression";
|
||||||
|
|
||||||
// Template Literals
|
// Template Literals
|
||||||
|
|
||||||
export type TemplateLiteral = NodeBase & {
|
export type TemplateLiteral = NodeBase & {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user