1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +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 (Call
(Identifier) (Identifier)
(Empty))) (Empty)))
{+(Pattern (Pattern
{+(LessThan (LessThan
{+(Identifier)+} { (Identifier)
{+(Identifier)+})+} ->(Identifier) }
{+(Call { (Identifier)
{+(Identifier)+} ->(Identifier) })
{+(Empty)+})+})+} {-(Context
{+(Pattern {-(Comment)-}
{+(Equal (Call
{+(Identifier)+} (Identifier)
{+(Integer)+})+} (Empty)))-})
{+(Call
{+(Identifier)+}
{+(Empty)+})+})+}
{-(Context {-(Context
{-(Comment)-} {-(Comment)-}
{-(Pattern (Pattern
{-(LessThan (Equal
{-(Identifier)-} { (Identifier)
{-(Identifier)-})-} ->(Identifier) }
{-(Context (Integer))
{-(Comment)-} (Call
{-(Call { (Identifier)
{-(Identifier)-} ->(Identifier) }
{-(Empty)-})-})-})-})-} (Empty))))-}))))
{-(Pattern
{-(Equal
{-(Identifier)-}
{-(Integer)-})-}
{-(Call
{-(Identifier)-}
{-(Empty)-})-})-}))))

View File

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

View File

@ -15,21 +15,21 @@
(Call (Call
(Identifier) (Identifier)
(Empty))) (Empty)))
(Pattern
(LessThan
(Identifier)
(Identifier))
(Context
(Comment)
(Call
(Identifier)
(Empty))))
(Context (Context
(Comment) (Comment)
(Pattern (Pattern
(LessThan (Equal
(Identifier) (Identifier)
(Identifier)) (Integer))
(Context (Call
(Comment) (Identifier)
(Call (Empty))))))))
(Identifier)
(Empty)))))
(Pattern
(Equal
(Identifier)
(Integer))
(Call
(Identifier)
(Empty)))))))

View File

@ -17,22 +17,22 @@
{ (Identifier) { (Identifier)
->(Identifier) })) ->(Identifier) }))
( (
(Pattern
(
(Identifier)
(Pointer
(MemberAccess
(Identifier)
(Identifier))))
([]))
(Context (Context
(Comment) (Comment)
(Pattern (Pattern
( (Slice
(Identifier))
(Call
(Identifier) (Identifier)
(Pointer (Empty))))
(MemberAccess
(Identifier)
(Identifier))))
([])))
(Pattern
(Slice
(Identifier))
(Call
(Identifier)
(Empty)))
(Pattern (Pattern
(Pointer (Pointer
(Identifier)) (Identifier))

View File

@ -17,22 +17,22 @@
{ (Identifier) { (Identifier)
->(Identifier) })) ->(Identifier) }))
( (
(Pattern
(
(Identifier)
(Pointer
(MemberAccess
(Identifier)
(Identifier))))
([]))
(Context (Context
(Comment) (Comment)
(Pattern (Pattern
( (Slice
(Identifier))
(Call
(Identifier) (Identifier)
(Pointer (Empty))))
(MemberAccess
(Identifier)
(Identifier))))
([])))
(Pattern
(Slice
(Identifier))
(Call
(Identifier)
(Empty)))
(Pattern (Pattern
(Pointer (Pointer
(Identifier)) (Identifier))

View File

@ -14,22 +14,22 @@
(TypeSwitchGuard (TypeSwitchGuard
(Identifier))) (Identifier)))
( (
(Pattern
(
(Identifier)
(Pointer
(MemberAccess
(Identifier)
(Identifier))))
([]))
(Context (Context
(Comment) (Comment)
(Pattern (Pattern
( (Slice
(Identifier))
(Call
(Identifier) (Identifier)
(Pointer (Empty))))
(MemberAccess
(Identifier)
(Identifier))))
([])))
(Pattern
(Slice
(Identifier))
(Call
(Identifier)
(Empty)))
(Pattern (Pattern
(Pointer (Pointer
(Identifier)) (Identifier))

View File

@ -14,22 +14,22 @@
(TypeSwitchGuard (TypeSwitchGuard
(Identifier))) (Identifier)))
( (
(Pattern
(
(Identifier)
(Pointer
(MemberAccess
(Identifier)
(Identifier))))
([]))
(Context (Context
(Comment) (Comment)
(Pattern (Pattern
( (Slice
(Identifier))
(Call
(Identifier) (Identifier)
(Pointer (Empty))))
(MemberAccess
(Identifier)
(Identifier))))
([])))
(Pattern
(Slice
(Identifier))
(Call
(Identifier)
(Empty)))
(Pattern (Pattern
(Pointer (Pointer
(Identifier)) (Identifier))

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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