mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Map yield expression, lexical declaration and assignment pattern
This commit is contained in:
parent
b49e07f881
commit
129da112b3
@ -106,11 +106,13 @@ categoryForJavaScriptProductionName name = case name of
|
||||
"arguments" -> Args
|
||||
"statement_block" -> ExpressionStatements
|
||||
"assignment" -> Assignment
|
||||
"assignment_pattern" -> Assignment
|
||||
"member_access" -> MemberAccess
|
||||
"op" -> Operator
|
||||
"subscript_access" -> SubscriptAccess
|
||||
"regex" -> Regex
|
||||
"template_string" -> TemplateString
|
||||
"lexical_declaration" -> VarDecl
|
||||
"variable_declaration" -> VarDecl
|
||||
"trailing_variable_declaration" -> VarDecl
|
||||
"switch_statement" -> Switch
|
||||
@ -136,5 +138,5 @@ categoryForJavaScriptProductionName name = case name of
|
||||
"export_statement" -> Export
|
||||
"break_statement" -> Break
|
||||
"continue_statement" -> Continue
|
||||
"yield_statement" -> Yield
|
||||
"yield_expression" -> Yield
|
||||
_ -> Other name
|
||||
|
@ -90,7 +90,7 @@ styleName category = "category-" <> case category of
|
||||
C.Interpolation -> "interpolation"
|
||||
C.Subshell -> "subshell"
|
||||
C.OperatorAssignment -> "operator_assignment"
|
||||
C.Yield -> "yield_statement"
|
||||
C.Yield -> "yield_expression"
|
||||
C.Until -> "until"
|
||||
C.Unless -> "unless_statement"
|
||||
C.Begin -> "begin_statement"
|
||||
|
@ -4,6 +4,6 @@
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(Yield)
|
||||
(Yield
|
||||
(Identifier)))))+}
|
||||
(ExpressionStatements (Yield))
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier))))))+}
|
||||
|
@ -4,6 +4,6 @@
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(Yield)
|
||||
(Yield
|
||||
(Identifier)))))+}
|
||||
(ExpressionStatements (Yield))
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier))))))+}
|
||||
|
@ -4,6 +4,6 @@
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(Yield)
|
||||
(Yield
|
||||
(Identifier)))))-}
|
||||
(ExpressionStatements (Yield))
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier))))))-}
|
||||
|
@ -4,6 +4,6 @@
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(Yield)
|
||||
(Yield
|
||||
(Identifier)))))-}
|
||||
(ExpressionStatements (Yield))
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier))))))-}
|
||||
|
@ -5,6 +5,6 @@
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(Yield)
|
||||
(Yield
|
||||
(Identifier)))))
|
||||
(ExpressionStatements (Yield))
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier))))))
|
||||
|
@ -5,6 +5,6 @@
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(Yield)
|
||||
(Yield
|
||||
(Identifier)))))
|
||||
(ExpressionStatements (Yield))
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier))))))
|
||||
|
@ -4,6 +4,6 @@
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(Yield)
|
||||
(Yield
|
||||
(Identifier)))))
|
||||
(ExpressionStatements (Yield))
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier))))))
|
||||
|
@ -4,6 +4,6 @@
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(Yield)
|
||||
(Yield
|
||||
(Identifier)))))
|
||||
(ExpressionStatements (Yield))
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier))))))
|
||||
|
4
test/fixtures/javascript/yield.diff+A.txt
vendored
4
test/fixtures/javascript/yield.diff+A.txt
vendored
@ -7,5 +7,5 @@
|
||||
(VarAssignment
|
||||
(Identifier)
|
||||
(NumberLiteral)))
|
||||
(Yield
|
||||
(Identifier))))))+}
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier)))))))+}
|
||||
|
4
test/fixtures/javascript/yield.diff+B.txt
vendored
4
test/fixtures/javascript/yield.diff+B.txt
vendored
@ -7,7 +7,7 @@
|
||||
(VarAssignment
|
||||
(Identifier)
|
||||
(NumberLiteral)))
|
||||
(Yield
|
||||
(ExpressionStatements (Yield
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
(Other "++")))))))+}
|
||||
(Other "++"))))))))+}
|
||||
|
4
test/fixtures/javascript/yield.diff-A.txt
vendored
4
test/fixtures/javascript/yield.diff-A.txt
vendored
@ -7,5 +7,5 @@
|
||||
(VarAssignment
|
||||
(Identifier)
|
||||
(NumberLiteral)))
|
||||
(Yield
|
||||
(Identifier))))))-}
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier)))))))-}
|
||||
|
4
test/fixtures/javascript/yield.diff-B.txt
vendored
4
test/fixtures/javascript/yield.diff-B.txt
vendored
@ -7,7 +7,7 @@
|
||||
(VarAssignment
|
||||
(Identifier)
|
||||
(NumberLiteral)))
|
||||
(Yield
|
||||
(ExpressionStatements (Yield
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
(Other "++")))))))-}
|
||||
(Other "++"))))))))-}
|
||||
|
4
test/fixtures/javascript/yield.diffA-B.txt
vendored
4
test/fixtures/javascript/yield.diffA-B.txt
vendored
@ -7,9 +7,9 @@
|
||||
(VarAssignment
|
||||
(Identifier)
|
||||
(NumberLiteral)))
|
||||
(Yield {
|
||||
(ExpressionStatements (Yield {
|
||||
(Identifier)
|
||||
->
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
(Other "++")) })))))
|
||||
(Other "++")) }))))))
|
||||
|
4
test/fixtures/javascript/yield.diffB-A.txt
vendored
4
test/fixtures/javascript/yield.diffB-A.txt
vendored
@ -7,9 +7,9 @@
|
||||
(VarAssignment
|
||||
(Identifier)
|
||||
(NumberLiteral)))
|
||||
(Yield {
|
||||
(ExpressionStatements (Yield {
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
(Other "++"))
|
||||
->
|
||||
(Identifier) })))))
|
||||
(Identifier) }))))))
|
||||
|
4
test/fixtures/javascript/yield.parseA.txt
vendored
4
test/fixtures/javascript/yield.parseA.txt
vendored
@ -7,5 +7,5 @@
|
||||
(VarAssignment
|
||||
(Identifier)
|
||||
(NumberLiteral)))
|
||||
(Yield
|
||||
(Identifier))))))
|
||||
(ExpressionStatements (Yield
|
||||
(Identifier)))))))
|
||||
|
4
test/fixtures/javascript/yield.parseB.txt
vendored
4
test/fixtures/javascript/yield.parseB.txt
vendored
@ -7,7 +7,7 @@
|
||||
(VarAssignment
|
||||
(Identifier)
|
||||
(NumberLiteral)))
|
||||
(Yield
|
||||
(ExpressionStatements (Yield
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
(Other "++")))))))
|
||||
(Other "++"))))))))
|
||||
|
Loading…
Reference in New Issue
Block a user