mirror of
https://github.com/github/semantic.git
synced 2024-12-19 21:01:35 +03:00
Merge pull request #715 from github/add-javascript-syntaxes
Add test cases for remaining Javascript syntaxes
This commit is contained in:
commit
0593503207
13
Untitled
Normal file
13
Untitled
Normal file
@ -0,0 +1,13 @@
|
||||
For statements
|
||||
For-in statements
|
||||
while statements
|
||||
do statements
|
||||
return statements
|
||||
let statements Not in ES2016
|
||||
Verify generator functions map to Function
|
||||
Throw statements
|
||||
Try/Catch/Finally statements
|
||||
Arrays
|
||||
Objects with method definitions
|
||||
Classes
|
||||
Constructor calls
|
@ -40,6 +40,8 @@ data Category
|
||||
| IntegerLiteral
|
||||
-- | A regex literal.
|
||||
| Regex
|
||||
-- | A return statement.
|
||||
| Return
|
||||
-- | A symbol literal.
|
||||
| SymbolLiteral
|
||||
-- | A template string literal.
|
||||
@ -76,8 +78,6 @@ data Category
|
||||
| Operator
|
||||
-- | An object/dictionary/hash literal.
|
||||
| Object
|
||||
-- | A return statement.
|
||||
| Return
|
||||
-- | A throw statement.
|
||||
| Throw
|
||||
-- | A constructor statement, e.g. new Foo;
|
||||
@ -118,6 +118,7 @@ instance Arbitrary Category where
|
||||
, pure StringLiteral
|
||||
, pure IntegerLiteral
|
||||
, pure Regex
|
||||
, pure Return
|
||||
, pure SymbolLiteral
|
||||
, pure TemplateString
|
||||
, pure ArrayLiteral
|
||||
@ -135,6 +136,13 @@ instance Arbitrary Category where
|
||||
, pure Case
|
||||
, pure Operator
|
||||
, pure Object
|
||||
, pure Throw
|
||||
, pure Constructor
|
||||
, pure Try
|
||||
, pure Catch
|
||||
, pure Finally
|
||||
, pure Class
|
||||
, pure Method
|
||||
, Other <$> arbitrary
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user