1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Update tests fixtures

This commit is contained in:
Rick Winfrey 2017-11-20 11:07:21 -08:00
parent 5ade935a08
commit 52bc364168
17 changed files with 552 additions and 121 deletions

View File

@ -0,0 +1,128 @@
(Program
(Module
(Identifier))
(Function
(Empty)
(Identifier)
([])
(
(Context
(Comment)
(Or
{ (Identifier)
->(Identifier) }
(Context
(Comment)
{ (Identifier)
->(Identifier) })))
(Context
(Comment)
(And
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) }))
{+(Equal
{+(Identifier)+}
{+(Identifier)+})+}
{+(Not
{+(Equal
{+(Identifier)+}
{+(Identifier)+})+})+}
{+(LessThan
{+(Identifier)+}
{+(Identifier)+})+}
{+(LessThanEqual
{+(Identifier)+}
{+(Identifier)+})+}
{+(GreaterThan
{+(Identifier)+}
{+(Identifier)+})+}
{+(GreaterThanEqual
{+(Identifier)+}
{+(Identifier)+})+}
{+(Plus
{+(Identifier)+}
{+(Identifier)+})+}
{+(Minus
{+(Identifier)+}
{+(Identifier)+})+}
{+(BOr
{+(Identifier)+}
{+(Identifier)+})+}
{+(BXOr
{+(Identifier)+}
{+(Identifier)+})+}
{+(Times
{+(Identifier)+}
{+(Identifier)+})+}
{+(DividedBy
{+(Identifier)+}
{+(Identifier)+})+}
{+(Modulo
{+(Identifier)+}
{+(Identifier)+})+}
{+(LShift
{+(Identifier)+}
{+(Identifier)+})+}
{+(RShift
{+(Identifier)+}
{+(Identifier)+})+}
{+(BAnd
{+(Identifier)+}
{+(Identifier)+})+}
{+(BAnd
{+(Identifier)+}
{+(Identifier)+})+}
{-(Equal
{-(Identifier)-}
{-(Identifier)-})-}
{-(Not
{-(Equal
{-(Identifier)-}
{-(Identifier)-})-})-}
{-(LessThan
{-(Identifier)-}
{-(Identifier)-})-}
{-(LessThanEqual
{-(Identifier)-}
{-(Identifier)-})-}
{-(GreaterThan
{-(Identifier)-}
{-(Identifier)-})-}
{-(GreaterThanEqual
{-(Identifier)-}
{-(Identifier)-})-}
{-(Plus
{-(Identifier)-}
{-(Identifier)-})-}
{-(Minus
{-(Identifier)-}
{-(Identifier)-})-}
{-(BOr
{-(Identifier)-}
{-(Identifier)-})-}
{-(BXOr
{-(Identifier)-}
{-(Identifier)-})-}
{-(Times
{-(Identifier)-}
{-(Identifier)-})-}
{-(DividedBy
{-(Identifier)-}
{-(Identifier)-})-}
{-(Modulo
{-(Identifier)-}
{-(Identifier)-})-}
{-(LShift
{-(Identifier)-}
{-(Identifier)-})-}
{-(RShift
{-(Identifier)-}
{-(Identifier)-})-}
{-(BAnd
{-(Identifier)-}
{-(Identifier)-})-}
{-(BAnd
{-(Identifier)-}
{-(Identifier)-})-})))

View File

@ -0,0 +1,128 @@
(Program
(Module
(Identifier))
(Function
(Empty)
(Identifier)
([])
(
(Context
(Comment)
(Or
{ (Identifier)
->(Identifier) }
(Context
(Comment)
{ (Identifier)
->(Identifier) })))
(Context
(Comment)
(And
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) }))
{+(Equal
{+(Identifier)+}
{+(Identifier)+})+}
{+(Not
{+(Equal
{+(Identifier)+}
{+(Identifier)+})+})+}
{+(LessThan
{+(Identifier)+}
{+(Identifier)+})+}
{+(LessThanEqual
{+(Identifier)+}
{+(Identifier)+})+}
{+(GreaterThan
{+(Identifier)+}
{+(Identifier)+})+}
{+(GreaterThanEqual
{+(Identifier)+}
{+(Identifier)+})+}
{+(Plus
{+(Identifier)+}
{+(Identifier)+})+}
{+(Minus
{+(Identifier)+}
{+(Identifier)+})+}
{+(BOr
{+(Identifier)+}
{+(Identifier)+})+}
{+(BXOr
{+(Identifier)+}
{+(Identifier)+})+}
{+(Times
{+(Identifier)+}
{+(Identifier)+})+}
{+(DividedBy
{+(Identifier)+}
{+(Identifier)+})+}
{+(Modulo
{+(Identifier)+}
{+(Identifier)+})+}
{+(LShift
{+(Identifier)+}
{+(Identifier)+})+}
{+(RShift
{+(Identifier)+}
{+(Identifier)+})+}
{+(BAnd
{+(Identifier)+}
{+(Identifier)+})+}
{+(BAnd
{+(Identifier)+}
{+(Identifier)+})+}
{-(Equal
{-(Identifier)-}
{-(Identifier)-})-}
{-(Not
{-(Equal
{-(Identifier)-}
{-(Identifier)-})-})-}
{-(LessThan
{-(Identifier)-}
{-(Identifier)-})-}
{-(LessThanEqual
{-(Identifier)-}
{-(Identifier)-})-}
{-(GreaterThan
{-(Identifier)-}
{-(Identifier)-})-}
{-(GreaterThanEqual
{-(Identifier)-}
{-(Identifier)-})-}
{-(Plus
{-(Identifier)-}
{-(Identifier)-})-}
{-(Minus
{-(Identifier)-}
{-(Identifier)-})-}
{-(BOr
{-(Identifier)-}
{-(Identifier)-})-}
{-(BXOr
{-(Identifier)-}
{-(Identifier)-})-}
{-(Times
{-(Identifier)-}
{-(Identifier)-})-}
{-(DividedBy
{-(Identifier)-}
{-(Identifier)-})-}
{-(Modulo
{-(Identifier)-}
{-(Identifier)-})-}
{-(LShift
{-(Identifier)-}
{-(Identifier)-})-}
{-(RShift
{-(Identifier)-}
{-(Identifier)-})-}
{-(BAnd
{-(Identifier)-}
{-(Identifier)-})-}
{-(BAnd
{-(Identifier)-}
{-(Identifier)-})-})))

View File

@ -0,0 +1,72 @@
(Program
(Module
(Identifier))
(Function
(Empty)
(Identifier)
([])
(
(Context
(Comment)
(Or
(Identifier)
(Context
(Comment)
(Identifier))))
(Context
(Comment)
(And
(Identifier)
(Identifier)))
(Equal
(Identifier)
(Identifier))
(Not
(Equal
(Identifier)
(Identifier)))
(LessThan
(Identifier)
(Identifier))
(LessThanEqual
(Identifier)
(Identifier))
(GreaterThan
(Identifier)
(Identifier))
(GreaterThanEqual
(Identifier)
(Identifier))
(Plus
(Identifier)
(Identifier))
(Minus
(Identifier)
(Identifier))
(BOr
(Identifier)
(Identifier))
(BXOr
(Identifier)
(Identifier))
(Times
(Identifier)
(Identifier))
(DividedBy
(Identifier)
(Identifier))
(Modulo
(Identifier)
(Identifier))
(LShift
(Identifier)
(Identifier))
(RShift
(Identifier)
(Identifier))
(BAnd
(Identifier)
(Identifier))
(BAnd
(Identifier)
(Identifier)))))

View File

@ -0,0 +1,72 @@
(Program
(Module
(Identifier))
(Function
(Empty)
(Identifier)
([])
(
(Context
(Comment)
(Or
(Identifier)
(Context
(Comment)
(Identifier))))
(Context
(Comment)
(And
(Identifier)
(Identifier)))
(Equal
(Identifier)
(Identifier))
(Not
(Equal
(Identifier)
(Identifier)))
(LessThan
(Identifier)
(Identifier))
(LessThanEqual
(Identifier)
(Identifier))
(GreaterThan
(Identifier)
(Identifier))
(GreaterThanEqual
(Identifier)
(Identifier))
(Plus
(Identifier)
(Identifier))
(Minus
(Identifier)
(Identifier))
(BOr
(Identifier)
(Identifier))
(BXOr
(Identifier)
(Identifier))
(Times
(Identifier)
(Identifier))
(DividedBy
(Identifier)
(Identifier))
(Modulo
(Identifier)
(Identifier))
(LShift
(Identifier)
(Identifier))
(RShift
(Identifier)
(Identifier))
(BAnd
(Identifier)
(Identifier))
(BAnd
(Identifier)
(Identifier)))))

View File

@ -17,35 +17,25 @@
(Call
(Identifier)
(Empty)))
{+(Pattern
{+(LessThan
{+(Identifier)+}
{+(Identifier)+})+}
{+(Call
{+(Identifier)+}
{+(Empty)+})+})+}
{+(Pattern
{+(Equal
{+(Identifier)+}
{+(Integer)+})+}
{+(Call
{+(Identifier)+}
{+(Empty)+})+})+}
(Pattern
(LessThan
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
{-(Context
{-(Comment)-}
{-(Pattern
{-(LessThan
{-(Identifier)-}
{-(Identifier)-})-}
(Call
(Identifier)
(Empty)))-})
{-(Context
{-(Comment)-}
{-(Call
{-(Identifier)-}
{-(Empty)-})-})-})-})-}
{-(Pattern
{-(Equal
{-(Identifier)-}
{-(Integer)-})-}
{-(Call
{-(Identifier)-}
{-(Empty)-})-})-}))))
(Pattern
(Equal
{ (Identifier)
->(Identifier) }
(Integer))
(Call
{ (Identifier)
->(Identifier) }
(Empty))))-}))))

View File

@ -17,32 +17,25 @@
(Call
(Identifier)
(Empty)))
{+(Context
{+(Comment)+}
{+(Pattern
{+(LessThan
{+(Identifier)+}
{+(Identifier)+})+}
{+(Context
{+(Comment)+}
{+(Call
{+(Identifier)+}
{+(Empty)+})+})+})+})+}
(Pattern
{ (LessThan
{-(Identifier)-}
{-(Identifier)-})
->(Equal
{+(Identifier)+}
{+(Integer)+}) }
(LessThan
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
{+(Context
{+(Comment)+}
(Call
(Identifier)
(Empty)))+})
{+(Context
{+(Comment)+}
(Pattern
(Equal
{ (Identifier)
->(Identifier) }
(Integer))
(Call
{ (Identifier)
->(Identifier) }
(Empty)))
{-(Pattern
{-(Equal
{-(Identifier)-}
{-(Integer)-})-}
{-(Call
{-(Identifier)-}
{-(Empty)-})-})-}))))
(Empty))))+}))))

View File

@ -15,8 +15,6 @@
(Call
(Identifier)
(Empty)))
(Context
(Comment)
(Pattern
(LessThan
(Identifier)
@ -25,11 +23,13 @@
(Comment)
(Call
(Identifier)
(Empty)))))
(Empty))))
(Context
(Comment)
(Pattern
(Equal
(Identifier)
(Integer))
(Call
(Identifier)
(Empty)))))))
(Empty))))))))

View File

@ -17,8 +17,6 @@
{ (Identifier)
->(Identifier) }))
(
(Context
(Comment)
(Pattern
(
(Identifier)
@ -26,13 +24,15 @@
(MemberAccess
(Identifier)
(Identifier))))
([])))
([]))
(Context
(Comment)
(Pattern
(Slice
(Identifier))
(Call
(Identifier)
(Empty)))
(Empty))))
(Pattern
(Pointer
(Identifier))

View File

@ -17,8 +17,6 @@
{ (Identifier)
->(Identifier) }))
(
(Context
(Comment)
(Pattern
(
(Identifier)
@ -26,13 +24,15 @@
(MemberAccess
(Identifier)
(Identifier))))
([])))
([]))
(Context
(Comment)
(Pattern
(Slice
(Identifier))
(Call
(Identifier)
(Empty)))
(Empty))))
(Pattern
(Pointer
(Identifier))

View File

@ -14,8 +14,6 @@
(TypeSwitchGuard
(Identifier)))
(
(Context
(Comment)
(Pattern
(
(Identifier)
@ -23,13 +21,15 @@
(MemberAccess
(Identifier)
(Identifier))))
([])))
([]))
(Context
(Comment)
(Pattern
(Slice
(Identifier))
(Call
(Identifier)
(Empty)))
(Empty))))
(Pattern
(Pointer
(Identifier))

View File

@ -14,8 +14,6 @@
(TypeSwitchGuard
(Identifier)))
(
(Context
(Comment)
(Pattern
(
(Identifier)
@ -23,13 +21,15 @@
(MemberAccess
(Identifier)
(Identifier))))
([])))
([]))
(Context
(Comment)
(Pattern
(Slice
(Identifier))
(Call
(Identifier)
(Empty)))
(Empty))))
(Pattern
(Pointer
(Identifier))

View File

@ -1,7 +1,11 @@
package main
func main() {
!<-a
+a
-b
!<-c
*foo()
^h
&bar
<-d
}

View File

@ -1,7 +1,11 @@
package main
func main() {
!<-b
+b
-c
!<-d
*bar()
^g
^i
&foo
<-e
}

View File

@ -6,6 +6,11 @@
(Identifier)
([])
(
{ (Identifier)
->(Identifier) }
(Negate
{ (Identifier)
->(Identifier) })
(Not
(Receive
(Empty)
@ -18,4 +23,11 @@
(Empty)))
(Complement
{ (Identifier)
->(Identifier) })
(Reference
{ (Identifier)
->(Identifier) })
(Receive
(Empty)
{ (Identifier)
->(Identifier) }))))

View File

@ -6,6 +6,11 @@
(Identifier)
([])
(
{ (Identifier)
->(Identifier) }
(Negate
{ (Identifier)
->(Identifier) })
(Not
(Receive
(Empty)
@ -18,4 +23,11 @@
(Empty)))
(Complement
{ (Identifier)
->(Identifier) })
(Reference
{ (Identifier)
->(Identifier) })
(Receive
(Empty)
{ (Identifier)
->(Identifier) }))))

View File

@ -6,6 +6,9 @@
(Identifier)
([])
(
(Identifier)
(Negate
(Identifier))
(Not
(Receive
(Empty)
@ -15,4 +18,9 @@
(Identifier)
(Empty)))
(Complement
(Identifier))
(Reference
(Identifier))
(Receive
(Empty)
(Identifier)))))

View File

@ -6,6 +6,9 @@
(Identifier)
([])
(
(Identifier)
(Negate
(Identifier))
(Not
(Receive
(Empty)
@ -15,4 +18,9 @@
(Identifier)
(Empty)))
(Complement
(Identifier))
(Reference
(Identifier))
(Receive
(Empty)
(Identifier)))))