1
1
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:
joshvera 2017-03-16 17:18:49 -04:00
parent 643d289bf0
commit e44e884b98
7 changed files with 14 additions and 21 deletions

View File

@ -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

View File

@ -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; } }

View File

@ -2,6 +2,7 @@
(ExpressionStatements
(Class
(Identifier)
(Assignment(Identifier)(NumberLiteral))
(Method
(Identifier)
(Identifier)

View File

@ -2,6 +2,7 @@
(ExpressionStatements
(Class
(Identifier)
(Assignment(Identifier)(NumberLiteral))
(Method
(Identifier)
(Identifier)

View File

@ -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)))- })))

View File

@ -2,6 +2,7 @@
(ExpressionStatements
(Class
(Identifier)
{+(Assignment(Identifier)(NumberLiteral))+}
(Method
{ (Identifier)
->(Identifier) }

View File

@ -2,6 +2,7 @@
(ExpressionStatements
(Class
(Identifier)
(Assignment(Identifier)(NumberLiteral))
(Method
(Identifier)
(Identifier)