Skip to content

Commit

Permalink
add more testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jan 23, 2022
1 parent 2c4d618 commit e30e146
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 0 deletions.
@@ -0,0 +1 @@
f<<<T>(x)
@@ -0,0 +1,49 @@
{
"type": "File",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}},
"program": {
"type": "Program",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}},
"expression": {
"type": "BinaryExpression",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}},
"left": {
"type": "Identifier",
"start":0,"end":1,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":1},"identifierName":"f"},
"name": "f"
},
"operator": "<<",
"right": {
"type": "TSTypeAssertion",
"start":3,"end":9,"loc":{"start":{"line":1,"column":3},"end":{"line":1,"column":9}},
"typeAnnotation": {
"type": "TSTypeReference",
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5}},
"typeName": {
"type": "Identifier",
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5},"identifierName":"T"},
"name": "T"
}
},
"expression": {
"type": "Identifier",
"start":7,"end":8,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":8},"identifierName":"x"},
"name": "x",
"extra": {
"parenthesized": true,
"parenStart": 6
}
}
}
}
}
],
"directives": []
}
}
@@ -0,0 +1 @@
f<< T > (()=>T) > T
@@ -0,0 +1,64 @@
{
"type": "File",
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
"program": {
"type": "Program",
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
"expression": {
"type": "BinaryExpression",
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
"left": {
"type": "BinaryExpression",
"start":0,"end":15,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":15}},
"left": {
"type": "BinaryExpression",
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}},
"left": {
"type": "Identifier",
"start":0,"end":1,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":1},"identifierName":"f"},
"name": "f"
},
"operator": "<<",
"right": {
"type": "Identifier",
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5},"identifierName":"T"},
"name": "T"
}
},
"operator": ">",
"right": {
"type": "ArrowFunctionExpression",
"start":9,"end":14,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":14}},
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "Identifier",
"start":13,"end":14,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":14},"identifierName":"T"},
"name": "T"
},
"extra": {
"parenthesized": true,
"parenStart": 8
}
}
},
"operator": ">",
"right": {
"type": "Identifier",
"start":18,"end":19,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":19},"identifierName":"T"},
"name": "T"
}
}
}
],
"directives": []
}
}
@@ -0,0 +1 @@
f<<<T>(x)
@@ -0,0 +1,49 @@
{
"type": "File",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}},
"program": {
"type": "Program",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}},
"expression": {
"type": "BinaryExpression",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}},
"left": {
"type": "Identifier",
"start":0,"end":1,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":1},"identifierName":"f"},
"name": "f"
},
"operator": "<<",
"right": {
"type": "TSTypeAssertion",
"start":3,"end":9,"loc":{"start":{"line":1,"column":3},"end":{"line":1,"column":9}},
"typeAnnotation": {
"type": "TSTypeReference",
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5}},
"typeName": {
"type": "Identifier",
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5},"identifierName":"T"},
"name": "T"
}
},
"expression": {
"type": "Identifier",
"start":7,"end":8,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":8},"identifierName":"x"},
"name": "x",
"extra": {
"parenthesized": true,
"parenStart": 6
}
}
}
}
}
],
"directives": []
}
}
@@ -0,0 +1 @@
f<< T > (()=>T) > T
@@ -0,0 +1,64 @@
{
"type": "File",
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
"program": {
"type": "Program",
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
"expression": {
"type": "BinaryExpression",
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
"left": {
"type": "BinaryExpression",
"start":0,"end":15,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":15}},
"left": {
"type": "BinaryExpression",
"start":0,"end":5,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":5}},
"left": {
"type": "Identifier",
"start":0,"end":1,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":1},"identifierName":"f"},
"name": "f"
},
"operator": "<<",
"right": {
"type": "Identifier",
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5},"identifierName":"T"},
"name": "T"
}
},
"operator": ">",
"right": {
"type": "ArrowFunctionExpression",
"start":9,"end":14,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":14}},
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "Identifier",
"start":13,"end":14,"loc":{"start":{"line":1,"column":13},"end":{"line":1,"column":14},"identifierName":"T"},
"name": "T"
},
"extra": {
"parenthesized": true,
"parenStart": 8
}
}
},
"operator": ">",
"right": {
"type": "Identifier",
"start":18,"end":19,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":19},"identifierName":"T"},
"name": "T"
}
}
}
],
"directives": []
}
}

0 comments on commit e30e146

Please sign in to comment.