mirror of
https://github.com/github/semantic.git
synced 2024-12-25 16:02:43 +03:00
Add class properties
This commit is contained in:
parent
643d289bf0
commit
e44e884b98
@ -107,6 +107,7 @@ categoryForJavaScriptProductionName name = case name of
|
||||
"statement_block" -> ExpressionStatements
|
||||
"assignment" -> Assignment
|
||||
"assignment_pattern" -> Assignment
|
||||
"public_field_definition" -> Assignment
|
||||
"member_access" -> MemberAccess
|
||||
"op" -> Operator
|
||||
"subscript_access" -> SubscriptAccess
|
||||
|
2
test/fixtures/javascript/class.A.js
vendored
2
test/fixtures/javascript/class.A.js
vendored
@ -1 +1 @@
|
||||
class Foo { static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }
|
||||
class Foo { bar = 5; static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }
|
||||
|
1
test/fixtures/javascript/class.diff+A.txt
vendored
1
test/fixtures/javascript/class.diff+A.txt
vendored
@ -2,6 +2,7 @@
|
||||
(ExpressionStatements
|
||||
(Class
|
||||
(Identifier)
|
||||
(Assignment(Identifier)(NumberLiteral))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
|
1
test/fixtures/javascript/class.diff-A.txt
vendored
1
test/fixtures/javascript/class.diff-A.txt
vendored
@ -2,6 +2,7 @@
|
||||
(ExpressionStatements
|
||||
(Class
|
||||
(Identifier)
|
||||
(Assignment(Identifier)(NumberLiteral))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
|
28
test/fixtures/javascript/class.diffA-B.txt
vendored
28
test/fixtures/javascript/class.diffA-B.txt
vendored
@ -1,22 +1,10 @@
|
||||
(Program
|
||||
(ExpressionStatements
|
||||
(Class
|
||||
(Identifier)
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)
|
||||
(Return
|
||||
(Identifier))))))
|
||||
(Class (Identifier)
|
||||
{+(Method(Identifier)(Identifier)(Return(Identifier)))+}
|
||||
{ +(Method(Identifier)(Identifier)(Return(Identifier)))+ }
|
||||
{ +(Method(Identifier)(Identifier)(Return(Identifier)))+ }
|
||||
{ -(Assignment(Identifier)(NumberLiteral))- }
|
||||
{ -(Method(Identifier)(Identifier)(Return(Identifier)))- }
|
||||
{ -(Method(Identifier)(Identifier)(Return(Identifier)))- }
|
||||
{ -(Method(Identifier)(Identifier)(Return(Identifier)))- })))
|
||||
|
1
test/fixtures/javascript/class.diffB-A.txt
vendored
1
test/fixtures/javascript/class.diffB-A.txt
vendored
@ -2,6 +2,7 @@
|
||||
(ExpressionStatements
|
||||
(Class
|
||||
(Identifier)
|
||||
{+(Assignment(Identifier)(NumberLiteral))+}
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
|
1
test/fixtures/javascript/class.parseA.txt
vendored
1
test/fixtures/javascript/class.parseA.txt
vendored
@ -2,6 +2,7 @@
|
||||
(ExpressionStatements
|
||||
(Class
|
||||
(Identifier)
|
||||
(Assignment(Identifier)(NumberLiteral))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
|
Loading…
Reference in New Issue
Block a user