Fix predicate attachment to match flow parser (#428)

This commit is contained in:
Brian Ng
2017-04-04 08:48:50 -05:00
committed by Daniel Tschinder
parent cbf4203237
commit bdfa92464b
51 changed files with 181 additions and 206 deletions

View File

@@ -153,67 +153,67 @@
}
}
}
}
}
},
"predicate": {
"type": "DeclaredPredicate",
"start": 40,
"end": 59,
"loc": {
"start": {
"line": 1,
"column": 40
},
"predicate": {
"type": "DeclaredPredicate",
"start": 40,
"end": 59,
"end": {
"line": 1,
"column": 59
}
},
"value": {
"type": "BinaryExpression",
"start": 48,
"end": 58,
"loc": {
"start": {
"line": 1,
"column": 48
},
"end": {
"line": 1,
"column": 58
}
},
"left": {
"type": "Identifier",
"start": 48,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 40
"column": 48
},
"end": {
"line": 1,
"column": 59
}
"column": 49
},
"identifierName": "x"
},
"expression": {
"type": "BinaryExpression",
"start": 48,
"end": 58,
"loc": {
"start": {
"line": 1,
"column": 48
},
"end": {
"line": 1,
"column": 58
}
"name": "x"
},
"operator": "!==",
"right": {
"type": "NullLiteral",
"start": 54,
"end": 58,
"loc": {
"start": {
"line": 1,
"column": 54
},
"left": {
"type": "Identifier",
"start": 48,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 48
},
"end": {
"line": 1,
"column": 49
},
"identifierName": "x"
},
"name": "x"
},
"operator": "!==",
"right": {
"type": "NullLiteral",
"start": 54,
"end": 58,
"loc": {
"start": {
"line": 1,
"column": 54
},
"end": {
"line": 1,
"column": 58
}
}
"end": {
"line": 1,
"column": 58
}
}
}

View File

@@ -88,37 +88,22 @@
"column": 52
}
},
"returnType": {
"type": "TypeAnnotation",
"start": 18,
"predicate": {
"type": "InferredPredicate",
"start": 20,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 18
"column": 20
},
"end": {
"line": 1,
"column": 27
}
},
"typeAnnotation": null,
"predicate": {
"type": "InferredPredicate",
"start": 20,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 27
}
}
}
},
"returnType": null,
"id": null,
"generator": false,
"expression": true,

View File

@@ -111,37 +111,22 @@
}
}
],
"returnType": {
"type": "TypeAnnotation",
"start": 22,
"predicate": {
"type": "InferredPredicate",
"start": 24,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 22
"column": 24
},
"end": {
"line": 1,
"column": 31
}
},
"typeAnnotation": null,
"predicate": {
"type": "InferredPredicate",
"start": 24,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 31
}
}
}
},
"returnType": null,
"body": {
"type": "BlockStatement",
"start": 32,

View File

@@ -589,10 +589,10 @@
"name": "Array"
}
}
},
"predicate": null
}
}
}
},
"predicate": null
}
],
"directives": []