Implement Smart Pipeline proposal in @babel/parser

This commit is contained in:
J. S. Choi
2018-07-08 15:57:43 -04:00
committed by James DiGioia
parent 19a1705293
commit fbf62b4830
184 changed files with 11224 additions and 79 deletions

View File

@@ -33,6 +33,12 @@ export default class State {
this.hasFlowComment = false;
this.isIterator = false;
// Used by smartPipelines.
this.topicContextState = {
maxNumOfResolvableTopics: 0,
maxTopicIndex: undefined,
};
this.classLevel = 0;
this.labels = [];
@@ -111,6 +117,9 @@ export default class State {
hasFlowComment: boolean;
isIterator: boolean;
// For the smartPipelines plugin:
topicContextState: tt.TopicContextState;
// Check whether we are in a (nested) class or not.
classLevel: number;