1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

…and the rest.

This commit is contained in:
Rob Rix 2017-02-24 11:42:11 -05:00
parent e5555ea133
commit 0d28bde257
37 changed files with 223 additions and 352 deletions

View File

@ -7,11 +7,7 @@
->(Identifier) }
(ExpressionStatements
(Return
{ (MathOperator
(Identifier)
(Other "+")
(Identifier))
->(MathOperator
(Identifier)
(Other "*")
(Identifier)) })))))
(MathOperator
{ (Identifier) -> (Identifier) }
{ (Other "+") -> (Other "*") }
{ (Identifier) -> (Identifier) }))))))

View File

@ -7,11 +7,7 @@
->(Identifier) }
(ExpressionStatements
(Return
{ (MathOperator
(Identifier)
(Other "*")
(Identifier))
->(MathOperator
(Identifier)
(Other "+")
(Identifier)) })))))
(MathOperator
{ (Identifier) -> (Identifier) }
{ (Other "*") -> (Other "+") }
{ (Identifier) -> (Identifier) }))))))

View File

@ -1,10 +1,6 @@
(Program
(ExpressionStatements
{ (BooleanOperator
(BooleanOperator
(Identifier)
(Other "&&")
(Identifier))
->(BooleanOperator
(Identifier)
(Other "||")
(Identifier)) }))
{ (Other "&&") -> (Other "||") }
(Identifier))))

View File

@ -1,12 +1,12 @@
(Program
(ExpressionStatements
{ (Operator
(Operator
(Other "delete")
{
(SubscriptAccess
(Identifier)
(StringLiteral)))
->(Operator
(Other "delete")
(StringLiteral))
->
(MemberAccess
(Identifier)
(Identifier))) }))
(Identifier)) })))

View File

@ -1,12 +1,12 @@
(Program
(ExpressionStatements
{ (Operator
(Operator
(Other "delete")
{
(MemberAccess
(Identifier)
(Identifier)))
->(Operator
(Other "delete")
(Identifier))
->
(SubscriptAccess
(Identifier)
(StringLiteral))) }))
(StringLiteral)) })))

View File

@ -72,26 +72,28 @@
(Other "export_specifier"
{ (Identifier)
->(Identifier) }))
{ (Export
(VarDecl
(Other "variable_declarator"
(Identifier)))
(VarDecl
(Other "variable_declarator"
(Identifier)))
(VarDecl
(Other "variable_declarator"
(Identifier))))
->(Export
(StringLiteral)
(Other "export_specifier"
(Identifier)
(Identifier))
(Other "export_specifier"
(Identifier)
(Identifier))
(Other "export_specifier"
(Identifier))) }
(Export
{ +(StringLiteral)+ }
{(VarDecl
(Other "variable_declarator"
(Identifier)))
->
(Other "export_specifier"
(Identifier)
(Identifier))}
{(VarDecl
(Other "variable_declarator"
(Identifier)))
->
(Other "export_specifier"
(Identifier)
(Identifier))}
{(VarDecl
(Other "variable_declarator"
(Identifier)))
->
(Other "export_specifier"
(Identifier))} )
{-(Export
(VarAssignment
(Identifier)
@ -137,4 +139,4 @@
(Identifier)
(Identifier))
(Other "export_specifier"
(Identifier)))-})
(Identifier)))-})

View File

@ -1,19 +1,9 @@
(Program
{ (If
(Identifier)
(If
{ (Identifier) -> (MemberAccess (Identifier) (Identifier)) }
(ExpressionStatements
(ExpressionStatements
(FunctionCall
(Identifier)
(Identifier)))))
->(If
(MemberAccess
(Identifier)
(Identifier))
(ExpressionStatements
(ExpressionStatements
(FunctionCall
(Identifier)
(Identifier)))
(ExpressionStatements
(Identifier)))) })
{ (Identifier) -> (Identifier) }))
{ +(ExpressionStatements (Identifier))+ })))

View File

@ -1,19 +1,9 @@
(Program
{ (If
(MemberAccess
(Identifier)
(Identifier))
(If
{ (MemberAccess (Identifier) (Identifier)) -> (Identifier) }
(ExpressionStatements
(ExpressionStatements
(FunctionCall
(Identifier)
(Identifier)))
(ExpressionStatements
(Identifier))))
->(If
(Identifier)
(ExpressionStatements
(ExpressionStatements
(FunctionCall
(Identifier)
(Identifier))))) })
{ (Identifier) -> (Identifier) }))
{ -(ExpressionStatements (Identifier))- })))

View File

@ -38,16 +38,15 @@
(Other "import_specifier"
(Identifier)
(Identifier))))+}
{ (Import
(StringLiteral)
(Import
{ (StringLiteral) -> (StringLiteral) }
{
(Other "named_imports"
(Other "import_specifier"
(Identifier))))
->(Import
(StringLiteral)
(Identifier)
(Other "namespace_import"
(Identifier))) }
(Identifier)))
->
(Identifier) }
{ +(Other "namespace_import" (Identifier))+ })
{+(Import
(StringLiteral))+}
{-(Import
@ -80,4 +79,4 @@
(Other "namespace_import"
(Identifier)))-}
{-(Import
(StringLiteral))-})
(StringLiteral))-})

View File

@ -38,16 +38,15 @@
(Other "import_specifier"
(Identifier)
(Identifier))))+}
{ (Import
(StringLiteral)
(Import
{ (StringLiteral) -> (StringLiteral) }
{
(Other "named_imports"
(Other "import_specifier"
(Identifier))))
->(Import
(StringLiteral)
(Identifier)
(Other "namespace_import"
(Identifier))) }
(Identifier)))
->
(Identifier) }
{ +(Other "namespace_import" (Identifier))+ })
{+(Import
(StringLiteral))+}
{-(Import
@ -80,4 +79,4 @@
(Other "namespace_import"
(Identifier)))-}
{-(Import
(StringLiteral))-})
(StringLiteral))-})

View File

@ -2,16 +2,11 @@
(ExpressionStatements
(Object
(Method
{ (Identifier)
->(Identifier) }
{ (Identifier) -> (Identifier) }
(Identifier)
(Identifier)
(Return
{ (MathOperator
(MathOperator
(Identifier)
(Other "+")
(Identifier))
->(MathOperator
(Identifier)
(Other "-")
(Identifier)) })))))
{ (Other "+") -> (Other "-") }
(Identifier)))))))

View File

@ -2,16 +2,11 @@
(ExpressionStatements
(Object
(Method
{ (Identifier)
->(Identifier) }
{ (Identifier) -> (Identifier) }
(Identifier)
(Identifier)
(Return
{ (MathOperator
(MathOperator
(Identifier)
(Other "-")
(Identifier))
->(MathOperator
(Identifier)
(Other "+")
(Identifier)) })))))
{ (Other "-") -> (Other "+") }
(Identifier)))))))

View File

@ -1,10 +1,6 @@
(Program
(ExpressionStatements
{ (RelationalOperator
(RelationalOperator
(Identifier)
(Other "<")
(Identifier))
->(RelationalOperator
(Identifier)
(Other "<=")
(Identifier)) }))
{ (Other "<") -> (Other "<=") }
(Identifier))))

View File

@ -1,10 +1,6 @@
(Program
(ExpressionStatements
{ (RelationalOperator
(RelationalOperator
(Identifier)
(Other "<=")
(Identifier))
->(RelationalOperator
(Identifier)
(Other "<")
(Identifier)) }))
{ (Other "<=") -> (Other "<") }
(Identifier))))

View File

@ -1,9 +1,6 @@
(Program
(ExpressionStatements
{ (Operator
(Other "typeof")
(Identifier))
->(Operator
(Identifier)
(Other "instanceof")
(Identifier)) }))
(Operator
{ (Other "typeof") -> (Identifier) }
{ (Identifier) -> (Other "instanceof") }
{ +(Identifier)+ })))

View File

@ -1,9 +1,6 @@
(Program
(ExpressionStatements
{ (Operator
(Identifier)
(Other "instanceof")
(Identifier))
->(Operator
(Other "typeof")
(Identifier)) }))
(Operator
{ (Identifier) -> (Other "typeof") }
{ (Other "instanceof") -> (Identifier) }
{ -(Identifier)- })))

View File

@ -7,9 +7,9 @@
(VarAssignment
(Identifier)
(NumberLiteral)))
{ (Yield
(Identifier))
->(Yield
(MathOperator
(Identifier)
(Other "++"))) }))))
(Yield {
(Identifier)
->
(MathOperator
(Identifier)
(Other "++")) })))))

View File

@ -7,9 +7,9 @@
(VarAssignment
(Identifier)
(NumberLiteral)))
{ (Yield
(MathOperator
(Identifier)
(Other "++")))
->(Yield
(Identifier)) }))))
(Yield {
(MathOperator
(Identifier)
(Other "++"))
->
(Identifier) })))))

View File

@ -1,16 +1,12 @@
(Program
{ (Binary
(Binary
(Identifier)
(Other "and")
{ (Other "and") -> (Other "or") }
(Identifier))
->(Binary
(Identifier)
(Other "or")
(Identifier)) }
{+(Binary
(Binary
(Identifier)
(Other "or")
(Identifier))
(Other "and")
(Identifier))+})
(Identifier))+})

View File

@ -1,16 +1,12 @@
(Program
{ (Binary
(Binary
(Identifier)
(Other "or")
{ (Other "or") -> (Other "and") }
(Identifier))
->(Binary
(Identifier)
(Other "and")
(Identifier)) }
{-(Binary
(Binary
(Identifier)
(Other "or")
(Identifier))
(Other "and")
(Identifier))-})
(Identifier))-})

View File

@ -1,21 +1,13 @@
(Program
{ (Binary
(Binary
(Identifier)
(Other "|")
{ (Other "|") -> (Other "&") }
(Identifier))
->(Binary
(Binary
(Identifier)
(Other "&")
(Identifier)) }
{ (Binary
(Identifier)
(Other ">>")
{ (Other ">>") -> (Other "<<") }
(Identifier))
->(Binary
(Identifier)
(Other "<<")
(Identifier)) }
{-(Binary
(Identifier)
(Other "^")
(Identifier))-})
(Identifier))-})

View File

@ -1,21 +1,13 @@
(Program
{ (Binary
(Binary
(Identifier)
(Other "&")
{ (Other "&") -> (Other "|") }
(Identifier))
->(Binary
(Binary
(Identifier)
(Other "|")
(Identifier)) }
{ (Binary
(Identifier)
(Other "<<")
{ (Other "<<") -> (Other ">>") }
(Identifier))
->(Binary
(Identifier)
(Other ">>")
(Identifier)) }
{+(Binary
(Identifier)
(Other "^")
(Identifier))+})
(Identifier))+})

View File

@ -1,9 +1,5 @@
(Program
{ (Binary
(Binary
(Identifier)
(Other "&&")
(Identifier))
->(Binary
(Identifier)
(Other "||")
(Identifier)) })
{ (Other "&&") -> (Other "||") }
(Identifier)))

View File

@ -1,17 +1,9 @@
(Program
{ (Binary
(Binary
(Identifier)
(Other "<")
{ (Other "<") -> (Other "<=") }
(Identifier))
->(Binary
(Binary
(Identifier)
(Other "<=")
(Identifier)) }
{ (Binary
(Identifier)
(Other ">")
(Identifier))
->(Binary
(Identifier)
(Other ">=")
(Identifier)) })
{ (Other ">") -> (Other ">=") }
(Identifier)))

View File

@ -1,17 +1,9 @@
(Program
{ (Binary
(Binary
(Identifier)
(Other "<=")
{ (Other "<=") -> (Other "<") }
(Identifier))
->(Binary
(Binary
(Identifier)
(Other "<")
(Identifier)) }
{ (Binary
(Identifier)
(Other ">=")
(Identifier))
->(Binary
(Identifier)
(Other ">")
(Identifier)) })
{ (Other ">=") -> (Other ">") }
(Identifier)))

View File

@ -1,17 +1,12 @@
(Program
{ (SubscriptAccess
(Identifier)
(Identifier))
->(SubscriptAccess
(Identifier)
(StringLiteral)) }
(SubscriptAccess
{ (Identifier)
->(Identifier) }
{ (SymbolLiteral)
->(SymbolLiteral) })
{ (Identifier) -> (Identifier) }
{ (Identifier) -> (StringLiteral) })
(SubscriptAccess
{ (Identifier) -> (Identifier) }
{ (SymbolLiteral) -> (SymbolLiteral) })
{-(Assignment
(SubscriptAccess
(Identifier)
(Identifier))
(IntegerLiteral))-})
(IntegerLiteral))-})

View File

@ -1,17 +1,12 @@
(Program
{ (SubscriptAccess
(Identifier)
(StringLiteral))
->(SubscriptAccess
(Identifier)
(Identifier)) }
(SubscriptAccess
{ (Identifier)
->(Identifier) }
{ (SymbolLiteral)
->(SymbolLiteral) })
{ (Identifier) -> (Identifier) }
{ (StringLiteral) -> (Identifier) })
(SubscriptAccess
{ (Identifier) -> (Identifier) }
{ (SymbolLiteral) -> (SymbolLiteral) })
{+(Assignment
(SubscriptAccess
(Identifier)
(Identifier))
(IntegerLiteral))+})
(IntegerLiteral))+})

View File

@ -1,14 +1,18 @@
(Program
{ (For
(Identifier)
(Identifier)
(Identifier))
->(For
(For
{ (Identifier) -> (Identifier) }
{
(Identifier)
->
(ArrayLiteral
(IntegerLiteral)
(IntegerLiteral)
(IntegerLiteral))
}
{
(Identifier)
->
(MethodCall
(Identifier)
(Identifier))) })
(Identifier))
}))

View File

@ -1,14 +1,18 @@
(Program
{ (For
(Identifier)
(For
{ (Identifier) -> (Identifier) }
{
(ArrayLiteral
(IntegerLiteral)
(IntegerLiteral)
(IntegerLiteral))
->
(Identifier)
}
{
(MethodCall
(Identifier)
(Identifier)))
->(For
(Identifier))
->
(Identifier)
(Identifier)
(Identifier)) })
}))

View File

@ -1,11 +1,8 @@
(Program
(Object
{ (Pair
(SymbolLiteral)
(StringLiteral))
->(Pair
(Identifier)
(StringLiteral)) }
(Pair
{ (SymbolLiteral) -> (Identifier) }
{ (StringLiteral) -> (StringLiteral) })
{+(Pair
(Identifier)
(IntegerLiteral))+}
@ -20,4 +17,4 @@
(Boolean))-}
{-(Pair
(SymbolLiteral)
(IntegerLiteral))-}))
(IntegerLiteral))-}))

View File

@ -1,23 +1,17 @@
(Program
(Object
{ (Pair
(Identifier)
(StringLiteral))
->(Pair
(SymbolLiteral)
(StringLiteral)) }
(Pair
{ (Identifier) -> (SymbolLiteral) }
{ (StringLiteral) -> (StringLiteral) })
{+(Pair
(SymbolLiteral)
(IntegerLiteral))+}
{ (Pair
(Identifier)
(IntegerLiteral))
->(Pair
(StringLiteral)
(Boolean)) }
(Pair
{ (Identifier) -> (StringLiteral) }
{ (IntegerLiteral) -> (Boolean) })
{+(Pair
(SymbolLiteral)
(IntegerLiteral))+}
{-(Pair
(Identifier)
(Boolean))-}))
(Boolean))-}))

View File

@ -1,9 +1,7 @@
(Program
{ (AnonymousFunction
(Identifier)
(Identifier)
(Identifier)
(IntegerLiteral)
(IntegerLiteral))
->(AnonymousFunction
(Identifier)) })
(AnonymousFunction
{ -(Identifier)- }
{ -(Identifier)- }
{ -(Identifier)- }
{ (IntegerLiteral) -> (Identifier) }
{ -(IntegerLiteral)- }))

View File

@ -1,9 +1,7 @@
(Program
{ (AnonymousFunction
(Identifier))
->(AnonymousFunction
(Identifier)
(Identifier)
(Identifier)
(IntegerLiteral)
(IntegerLiteral)) })
(AnonymousFunction
{ +(Identifier)+ }
{ +(Identifier)+ }
{ +(Identifier)+ }
{ (Identifier) -> (IntegerLiteral) }
{ +(IntegerLiteral)+ }))

View File

@ -1,9 +1,10 @@
(Program
{ (AnonymousFunction
(Identifier))
->(AnonymousFunction
(AnonymousFunction
{ +(Identifier)+ }
{
(Identifier)
->
(Binary
(Identifier)
(Other "+")
(IntegerLiteral))) })
(IntegerLiteral)) }))

View File

@ -1,9 +1,10 @@
(Program
{ (AnonymousFunction
(Identifier)
(AnonymousFunction
{ -(Identifier)- }
{
(Binary
(Identifier)
(Other "+")
(IntegerLiteral)))
->(AnonymousFunction
(Identifier)) })
(IntegerLiteral))
->
(Identifier) }))

View File

@ -1,26 +1,18 @@
(Program
{ (Binary
(Binary
(Identifier)
(Other "==")
{ (Other "==") -> (Other "<=>") }
(Identifier))
->(Binary
(Binary
(Identifier)
(Other "<=>")
(Identifier)) }
{ (Binary
(Identifier)
(Other "!=")
{ (Other "!=") -> (Other "=~") }
(Identifier))
->(Binary
(Identifier)
(Other "=~")
(Identifier)) }
{+(Assignment
(Identifier)
(Unary
(Other "!")
(Identifier)))+}
{-(Binary
(Identifier)
(Other "===")
(Identifier))-})
{+(Assignment
(Identifier)
(Unary
(Other "!")
(Identifier)))+}
{-(Binary
(Identifier)
(Other "===")
(Identifier))-})

View File

@ -1,26 +1,18 @@
(Program
{ (Binary
(Binary
(Identifier)
(Other "<=>")
{ (Other "<=>") -> (Other "==") }
(Identifier))
->(Binary
(Binary
(Identifier)
(Other "==")
(Identifier)) }
{ (Binary
(Identifier)
(Other "=~")
{ (Other "=~") -> (Other "!=") }
(Identifier))
->(Binary
(Identifier)
(Other "!=")
(Identifier)) }
{+(Binary
(Identifier)
(Other "===")
(Identifier))+}
{-(Assignment
(Identifier)
(Unary
(Other "!")
(Identifier)))-})
{+(Binary
(Identifier)
(Other "===")
(Identifier))+}
{-(Assignment
(Identifier)
(Unary
(Other "!")
(Identifier)))-})