diff --git a/ANNOTATION.md b/ANNOTATION.md index 6a34a71f..e69de29b 100644 --- a/ANNOTATION.md +++ b/ANNOTATION.md @@ -1,182 +0,0 @@ -| Path | Action | -|------|--------| -| /self::\*\[not\(@InternalType='Module'\)\] | Error | -| /self::\*\[@InternalType='Module'\] | File | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='BinOp'\] | Expression, Binary | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='BinOp'\]/\*\[@internalRole\]\[@internalRole='op'\] | Expression, Binary, Operator | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='BinOp'\]/\*\[@internalRole\]\[@internalRole='left'\] | Expression, Binary, Left | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='BinOp'\]/\*\[@internalRole\]\[@internalRole='right'\] | Expression, Binary, Right | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Eq'\] | Binary, Operator, Equal | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='NotEq'\] | Binary, Operator, Equal, Not | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Lt'\] | Binary, Operator, LessThan | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='LtE'\] | Binary, Operator, LessThanOrEqual | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Gt'\] | Binary, Operator, GreaterThan | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='GtE'\] | Binary, Operator, GreaterThanOrEqual | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Is'\] | Binary, Operator, Identical | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IsNot'\] | Binary, Operator, Identical, Not | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='In'\] | Binary, Operator, Contains | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='NotIn'\] | Binary, Operator, Contains, Not | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Add'\] | Binary, Operator, Add | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Sub'\] | Binary, Operator, Substract | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Mult'\] | Binary, Operator, Multiply | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Div'\] | Binary, Operator, Divide | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Mod'\] | Binary, Operator, Modulo | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='FloorDiv'\] | Binary, Operator, Divide, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Pow'\] | Binary, Operator, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='MatMult'\] | Binary, Operator, Multiply, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='LShift'\] | Binary, Operator, Bitwise, LeftShift | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='RShift'\] | Binary, Operator, Bitwise, RightShift | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='BitOr'\] | Binary, Operator, Bitwise, Or | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='BitXor'\] | Binary, Operator, Bitwise, Xor | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='BitAnd'\] | Binary, Operator, Bitwise, And | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='And'\] | Binary, Operator, Boolean, And | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Or'\] | Binary, Operator, Boolean, Or | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Not'\] | Binary, Operator, Boolean, Not | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='UnaryOp'\] | Binary, Operator, Unary, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Invert'\] | Operator, Unary, Bitwise, Not | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='UAdd'\] | Operator, Unary, Positive | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='USub'\] | Operator, Unary, Negative | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Str'\] | Literal, String, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='StringLiteral'\] | Literal, String, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Bytes'\] | Literal, ByteString, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Num'\] | Literal, Number, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Num'\]/\*\[@internalRole\]\[@internalRole='n'\] | Literal, Number, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='BoolLiteral'\] | Literal, Boolean, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='JoinedStr'\] | Literal, String, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='JoinedStr'\]/\*\[@InternalType='FormattedValue'\] | Expression, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='NoneLiteral'\] | Literal, Null, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Set'\] | Literal, Set, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='List'\] | Literal, List, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Dict'\] | Literal, Map, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Dict'\]/\*\[@internalRole\]\[@internalRole='keys'\] | Map, Key | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Dict'\]/\*\[@internalRole\]\[@internalRole='values'\] | Map, Value | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Tuple'\] | Literal, Tuple, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='FunctionDef'\] | Function, Declaration, Name, Identifier | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AsyncFunctionDef'\] | Function, Declaration, Name, Identifier, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='FunctionDef\.decorator\_list'\] | Function, Declaration, Call, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='FunctionDef\.body'\] | Function, Declaration, Body | -| /self::\*\[@InternalType='Module'\]//\*\[@internalRole\]\[@internalRole='arguments'\] | Function, Declaration, Argument, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@internalRole\]\[@internalRole='args'\] | Function, Declaration, Argument, Name, Identifier | -| /self::\*\[@InternalType='Module'\]//\*\[@internalRole\]\[@internalRole='vararg'\] | Function, Declaration, Argument, ArgsList, Name, Identifier | -| /self::\*\[@InternalType='Module'\]//\*\[@internalRole\]\[@internalRole='kwarg'\] | Function, Declaration, Argument, ArgsList, Map, Name, Identifier | -| /self::\*\[@InternalType='Module'\]//\*\[@internalRole\]\[@internalRole='kwonlyargs'\] | Function, Declaration, Argument, ArgsList, Map, Name, Identifier | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='arguments\.defaults'\] | Function, Declaration, Argument, Value, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AsyncFunctionDef\.decorator\_list'\] | Function, Declaration, Call, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AsyncFunctionDef\.body'\] | Function, Declaration, Body | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Lambda'\] | Function, Declaration, Expression, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Lambda'\]/\*\[@InternalType='Lambda\.body'\] | Function, Declaration, Body | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Attribute'\] | Identifier, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Attribute'\]/\*\[@InternalType='Name'\] | Identifier, Qualified | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Call'\] | Function, Call, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Call'\]/\*\[@internalRole\]\[@internalRole='args'\] | Call, Argument, Positional | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Call'\]/\*\[@internalRole\]\[@internalRole='keywords'\] | Call, Argument, Name | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Call'\]/\*\[@internalRole\]\[@internalRole='keywords'\]/\*\[@internalRole\]\[@internalRole='value'\] | Call, Argument, Value | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Call'\]/\*\[@internalRole\]\[@internalRole='func'\]/self::\*\[@InternalType='Name'\] | Call, Callee | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Call'\]/\*\[@internalRole\]\[@internalRole='func'\]/self::\*\[@InternalType='Attribute'\] | Call, Callee | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Call'\]/\*\[@internalRole\]\[@internalRole='func'\]/self::\*\[@InternalType='Attribute'\]/\*\[@internalRole\]\[@internalRole='value'\] | Call, Receiver | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Assign'\] | Binary, Assignment, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Assign'\]/\*\[@internalRole\]\[@internalRole='targets'\] | Left | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Assign'\]/\*\[@internalRole\]\[@internalRole='value'\] | Right | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AugAssign'\] | Operator, Binary, Assignment, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AugAssign'\]/\*\[@internalRole\]\[@internalRole='op'\] | Operator, Binary | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AugAssign'\]/\*\[@internalRole\]\[@internalRole='target'\] | Left | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AugAssign'\]/\*\[@internalRole\]\[@internalRole='value'\] | Right | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Expression'\] | Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Expr'\] | Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Name'\] | Identifier, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='SameLineNoops'\] | Comment | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='PreviousNoops'\] | Whitespace | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='PreviousNoops'\]/\*\[@internalRole\]\[@internalRole='lines'\] | Comment | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='RemainderNoops'\] | Whitespace | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='RemainderNoops'\]/\*\[@internalRole\]\[@internalRole='lines'\] | Comment | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Constant'\] | Identifier, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Try'\] | Try, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Try'\]/\*\[@InternalType='Try\.body'\] | Try, Body | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Try'\]/\*\[@InternalType='Try\.finalbody'\] | Try, Finally | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Try'\]/\*\[@InternalType='Try\.handlers'\] | Try, Catch | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Try'\]/\*\[@InternalType='Try\.orelse'\] | Try, Body, Else | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='TryExcept'\] | Try, Catch, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ExceptHandler'\] | Try, Catch, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ExceptHandler\.name'\] | Try, Catch, Identifier | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='TryFinally'\] | Try, Finally, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Raise'\] | Throw, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='With'\] | Block, Scope, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='With\.body'\] | Block, Scope, Expression, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='With\.items'\] | Identifier, Expression, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AsyncWith'\] | Block, Scope, Statement, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='withitem'\] | Identifier, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Return'\] | Return, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Break'\] | Break, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Continue'\] | Continue, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Compare'\] | Expression, Binary | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Compare'\]/\*\[@InternalType='Compare\.ops'\] | Expression, Binary, Operator | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Compare'\]/\*\[@internalRole\]\[@internalRole='left'\] | Expression, Binary, Left | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Compare\.comparators'\] | Expression, Binary, Right | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='If'\] | If, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='If'\]/\*\[@InternalType='If\.body'\] | If, Body, Then | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='If'\]/\*\[@internalRole\]\[@internalRole='test'\] | If, Condition | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='If'\]/\*\[@InternalType='If\.orelse'\] | If, Body, Else | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IfExp'\] | If, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IfExp'\]/\*\[@internalRole\]\[@internalRole='body'\] | If, Body, Then | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IfExp'\]/\*\[@internalRole\]\[@internalRole='test'\] | If, Condition | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='IfExp'\]/\*\[@internalRole\]\[@internalRole='orelse'\] | If, Body, Else | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Import'\] | Import, Declaration, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='alias'\] | Import, Pathname, Identifier | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ImportFrom\.module'\] | Import, Pathname, Identifier | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='alias\.asname'\] | Import, Alias, Identifier | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ImportFrom'\] | Import, Declaration, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ClassDef'\] | Type, Declaration, Identifier, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ClassDef'\]/\*\[@InternalType='ClassDef\.decorator\_list'\] | Type, Call, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ClassDef'\]/\*\[@InternalType='ClassDef\.body'\] | Type, Declaration, Body | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ClassDef'\]/\*\[@InternalType='ClassDef\.bases'\] | Type, Declaration, Base | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ClassDef'\]/\*\[@InternalType='ClassDef\.keywords'\] | Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ClassDef'\]/\*\[@InternalType='ClassDef\.keywords'\]/\*\[@InternalType='keyword'\] | Identifier, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='For'\] | For, Iterator, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='For'\]/\*\[@InternalType='For\.body'\] | For, Body | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='For'\]/\*\[@internalRole\]\[@internalRole='iter'\] | For, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='For'\]/\*\[@internalRole\]\[@internalRole='target'\] | For, Update | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='For'\]/\*\[@InternalType='For\.orelse'\] | For, Body, Else | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AsyncFor'\] | For, Iterator, Statement, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AsyncFor'\]/\*\[@InternalType='AsyncFor\.body'\] | For, Body | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AsyncFor'\]/\*\[@internalRole\]\[@internalRole='iter'\] | For, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AsyncFor'\]/\*\[@internalRole\]\[@internalRole='target'\] | For, Update | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AsyncFor'\]/\*\[@InternalType='AsyncFor\.orelse'\] | For, Body, Else | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='While'\] | While, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='While'\]/\*\[@InternalType='While\.body'\] | While, Body | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='While'\]/\*\[@internalRole\]\[@internalRole='test'\] | While, Condition | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='While'\]/\*\[@InternalType='While\.orelse'\] | While, Body, Else | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Pass'\] | Noop, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Assert'\] | Assert, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Exec'\] | Function, Call, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Exec'\]/\*\[@internalRole\]\[@internalRole='body'\] | Call, Argument, Positional | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Exec'\]/\*\[@internalRole\]\[@internalRole='globals'\] | Call, Argument, Positional | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Exec'\]/\*\[@internalRole\]\[@internalRole='locals'\] | Call, Argument, Positional | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Print'\] | Function, Call, Callee, Identifier, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Print'\]/\*\[@internalRole\]\[@internalRole='dest'\] | Call, Argument, Positional | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Print'\]/\*\[@internalRole\]\[@internalRole='nl'\] | Call, Argument, Positional | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Print'\]/\*\[@internalRole\]\[@internalRole='values'\] | Call, Argument, Positional | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Print'\]/\*\[@internalRole\]\[@internalRole='values'\]/\*\[\*\] | Call, Argument, Positional | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='AnnAssign'\] | Operator, Binary, Assignment, Comment, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@internalRole\]\[@internalRole='annotation'\] | Comment, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@internalRole\]\[@internalRole='returns'\] | Comment, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Ellipsis'\] | Identifier, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ListComp'\] | List, For, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='DictComp'\] | Map, For, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='SetComp'\] | Set, For, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='comprehension'\] | For, Iterator, Expression, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='comprehension'\]/\*\[@internalRole\]\[@internalRole='iter'\] | For, Update, Statement | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='comprehension'\]/\*\[@internalRole\]\[@internalRole='target'\] | For, Expression | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='comprehension'\]/\*\[@InternalType='Compare'\] | If, Condition, Expression, Binary | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='comprehension'\]/\*\[@InternalType='Compare'\]/\*\[@InternalType='Compare\.ops'\] | Expression, Binary, Operator | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='comprehension'\]/\*\[@InternalType='Compare'\]/\*\[@internalRole\]\[@internalRole='left'\] | Expression, Binary, Left | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Delete'\] | Statement, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Await'\] | Statement, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Global'\] | Statement, Visibility, World, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Nonlocal'\] | Statement, Visibility, Module, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Yield'\] | Return, Statement, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='YieldFrom'\] | Return, Statement, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Yield'\] | Literal, List, Expression, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Subscript'\] | Expression, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Index'\] | Expression, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='Slice'\] | Expression, Incomplete | -| /self::\*\[@InternalType='Module'\]//\*\[@InternalType='ExtSlice'\] | Expression, Incomplete | diff --git a/Dockerfile.tpl b/Dockerfile.tpl index c52e1091..4ea03a7e 100644 --- a/Dockerfile.tpl +++ b/Dockerfile.tpl @@ -7,7 +7,6 @@ ARG PYDETECTOR_VER=0.14.2 RUN apk add --no-cache --update python python3 py-pip py2-pip git -ADD build /opt/driver/bin ADD native/python_package /tmp/python_driver ADD ${DEVDEPS} ${CONTAINER_DEVDEPS} @@ -20,4 +19,5 @@ RUN yes|rm -rf ${CONTAINER_DEVDEPS} RUN pip3 install /tmp/python_driver RUN yes|rm -rf /tmp/python_driver -CMD /opt/driver/bin/driver +ADD build /opt/driver +ENTRYPOINT ["/opt/driver/bin/driver"] diff --git a/Makefile b/Makefile index 4bd4cbea..16888e22 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ build-native-internal: pip3 install --user ${DEV_DEPS}/python-pydetector/ || pip3 install --user pydetector-bblfsh cd native/python_package/ && \ pip3 install -U --user . - cp native/sh/native.sh $(BUILD_PATH)/native; - chmod +x $(BUILD_PATH)/native + cp native/sh/native.sh $(BUILD_PATH)/bin/native; + chmod +x $(BUILD_PATH)/bin/native include .sdk/Makefile diff --git a/driver/main.go b/driver/main.go index 062cfc6f..58ea8370 100644 --- a/driver/main.go +++ b/driver/main.go @@ -1,20 +1,19 @@ package main import ( - "gopkg.in/bblfsh/sdk.v1/protocol/driver" - "github.com/bblfsh/python-driver/driver/normalizer" -) -var version string -var build string + "gopkg.in/bblfsh/sdk.v1/sdk/driver" +) func main() { - d := driver.Driver{ - Version: version, - Build: build, - ParserBuilder: normalizer.ParserBuilder, - Annotate: normalizer.AnnotationRules, + d, err := driver.NewDriver(normalizer.ToNode, normalizer.Transformers) + if err != nil { + panic(err) + } + + s := driver.NewServer(d) + if err := s.Start(); err != nil { + panic(err) } - d.Exec() } diff --git a/driver/normalizer/annotation.go b/driver/normalizer/annotation.go index c107dd92..d64294da 100644 --- a/driver/normalizer/annotation.go +++ b/driver/normalizer/annotation.go @@ -7,6 +7,9 @@ import ( "gopkg.in/bblfsh/sdk.v1/uast" . "gopkg.in/bblfsh/sdk.v1/uast/ann" + "gopkg.in/bblfsh/sdk.v1/uast/transformer" + "gopkg.in/bblfsh/sdk.v1/uast/transformer/annotatter" + "gopkg.in/bblfsh/sdk.v1/uast/transformer/positioner" ) /* @@ -37,7 +40,17 @@ Unmarked nodes or nodes needing new features from the SDK: (see: https://greentreesnakes.readthedocs.io/en/latest/nodes.html#Compare) */ -// AnnotationRules for the Python driver +// Transformers is the of list `transformer.Transfomer` to apply to a UAST, to +// learn more about the Transformers and the available ones take a look to: +// https://godoc.org/gopkg.in/bblfsh/sdk.v1/uast/transformers +var Transformers = []transformer.Tranformer{ + annotatter.NewAnnotatter(AnnotationRules), + positioner.NewFillOffsetFromLineCol(), +} + +// AnnotationRules describes how a UAST should be annotated with `uast.Role`. +// +// https://godoc.org/gopkg.in/bblfsh/sdk.v1/uast/ann var AnnotationRules = On(Any).Self( On(Not(pyast.Module)).Error(errors.New("root must be uast.Module")), On(pyast.Module).Roles(uast.File).Descendants( @@ -239,7 +252,7 @@ var AnnotationRules = On(Any).Self( On(pyast.AliasAsName).Roles(uast.Import, uast.Alias, uast.Identifier), On(pyast.ImportFrom).Roles(uast.Import, uast.Declaration, uast.Statement), On(pyast.ClassDef).Roles(uast.Type, uast.Declaration, uast.Identifier, uast.Statement).Children( - On(pyast.ClassDefDecorators).Roles(uast.Type, uast.Call, uast.Incomplete), + On(pyast.ClassDefDecorators).Roles(uast.Type, uast.Call, uast.Incomplete), On(pyast.ClassDefBody).Roles(uast.Type, uast.Declaration, uast.Body), On(pyast.ClassDefBases).Roles(uast.Type, uast.Declaration, uast.Base), On(pyast.ClassDefKeywords).Roles(uast.Incomplete).Children( diff --git a/driver/normalizer/annotation_test.go b/driver/normalizer/annotation_test.go index e6a55f00..9a53d71c 100644 --- a/driver/normalizer/annotation_test.go +++ b/driver/normalizer/annotation_test.go @@ -20,7 +20,7 @@ func TestAnnotate(t *testing.T) { f, err := getFixture("python_example_1.json") require.NoError(err) - n, err := ToNoder.ToNode(f) + n, err := ToNode.ToNode(f) require.NoError(err) require.NotNil(n) @@ -45,7 +45,7 @@ func TestAnnotatePrettyAnnotationsOnly(t *testing.T) { f, err := getFixture("python_example_1.json") require.NoError(err) - n, err := ToNoder.ToNode(f) + n, err := ToNode.ToNode(f) require.NoError(err) require.NotNil(n) @@ -59,7 +59,7 @@ func TestNodeTokens(t *testing.T) { f, err := getFixture("python_example_1.json") require.NoError(err) - n, err := ToNoder.ToNode(f) + n, err := ToNode.ToNode(f) require.NoError(err) require.NotNil(n) @@ -76,7 +76,7 @@ func TestAll(t *testing.T) { f, err := getFixture("python_example_1.json") require.NoError(err) - n, err := ToNoder.ToNode(f) + n, err := ToNode.ToNode(f) require.NoError(err) require.NotNil(n) diff --git a/driver/normalizer/parser.go b/driver/normalizer/tonode.go similarity index 53% rename from driver/normalizer/parser.go rename to driver/normalizer/tonode.go index a68fdc88..449715b3 100644 --- a/driver/normalizer/parser.go +++ b/driver/normalizer/tonode.go @@ -1,17 +1,17 @@ package normalizer -import ( - "gopkg.in/bblfsh/sdk.v1/protocol/driver" - "gopkg.in/bblfsh/sdk.v1/protocol/native" -) +import "gopkg.in/bblfsh/sdk.v1/uast" -var ToNoder = &native.ObjectToNoder{ +// ToNode is an instance of `uast.ObjectToNode`, defining how to transform an +// into a UAST (`uast.Node`). +// +// https://godoc.org/gopkg.in/bblfsh/sdk.v1/uast#ObjectToNode +var ToNode = &uast.ObjectToNode{ InternalTypeKey: "ast_type", LineKey: "lineno", EndLineKey: "end_lineno", ColumnKey: "col_offset", EndColumnKey: "end_col_offset", - PositionFill: native.OffsetFromLineCol, TokenKeys: map[string]bool{ "name": true, @@ -32,45 +32,45 @@ var ToNoder = &native.ObjectToNoder{ "BitOr": "|", "BitXor": "^", "Break": "break", - "Continue": "continue", - "Delete": "delete", - "Div": "/", - "Ellipsis": "...", - "Eq": "==", - "False": "false", - "For": "for", - "FloorDiv": "//", - "Global": "global", - "Gt": ">", - "GtE": ">=", - "If": "if", - "In": "in", - "Invert": "~", - "Is": "is", - "IsNot": "not is", - "LShift": "<<", - "Lt": "<", - "LtE": "<=", - "Mod": "%%", - "Mult": "*", - "None": "None", - "Nonlocal": "nonlocal", - "Not": "!", - "NotEq": "!=", - "NotIn": "not in", - "Pass": "pass", - "Pow": "**", - "Print": "print", - "Raise": "raise", - "Return": "return", - "RShift": ">>", - "Sub": "-", - "True": "true", - "UAdd": "+", - "USub": "-", - "While": "while", - "With": "with", - "Yield": "yield", + "Continue": "continue", + "Delete": "delete", + "Div": "/", + "Ellipsis": "...", + "Eq": "==", + "False": "false", + "For": "for", + "FloorDiv": "//", + "Global": "global", + "Gt": ">", + "GtE": ">=", + "If": "if", + "In": "in", + "Invert": "~", + "Is": "is", + "IsNot": "not is", + "LShift": "<<", + "Lt": "<", + "LtE": "<=", + "Mod": "%%", + "Mult": "*", + "None": "None", + "Nonlocal": "nonlocal", + "Not": "!", + "NotEq": "!=", + "NotIn": "not in", + "Pass": "pass", + "Pow": "**", + "Print": "print", + "Raise": "raise", + "Return": "return", + "RShift": ">>", + "Sub": "-", + "True": "true", + "UAdd": "+", + "USub": "-", + "While": "while", + "With": "with", + "Yield": "yield", }, PromoteAllPropertyLists: false, PromotedPropertyLists: map[string]map[string]bool{ @@ -96,26 +96,3 @@ var ToNoder = &native.ObjectToNoder{ }, // FIXME: test[ast_type=Compare].comparators is a list?? (should be "right") } - -// ParserBuilder creates a parser that transform source code files into *uast.Node. -func ParserBuilder(opts driver.ParserOptions) (parser driver.Parser, err error) { - parser, err = native.ExecParser(ToNoder, opts.NativeBin) - if err != nil { - return - } - - switch ToNoder.PositionFill { - case native.OffsetFromLineCol: - parser = &driver.TransformationParser{ - Parser: parser, - Transformation: driver.FillOffsetFromLineCol, - } - case native.LineColFromOffset: - parser = &driver.TransformationParser{ - Parser: parser, - Transformation: driver.FillLineColFromOffset, - } - } - - return -} diff --git a/driver/normalizer/parser_test.go b/driver/normalizer/tonode_test.go similarity index 90% rename from driver/normalizer/parser_test.go rename to driver/normalizer/tonode_test.go index 57fe47ef..23cb32a0 100644 --- a/driver/normalizer/parser_test.go +++ b/driver/normalizer/tonode_test.go @@ -12,7 +12,7 @@ func TestNativeToNoder(t *testing.T) { f, err := getFixture("python_example_1.json") require.NoError(err) - n, err := ToNoder.ToNode(f) + n, err := ToNode.ToNode(f) require.NoError(err) require.NotNil(n) } diff --git a/tests/annotations.py.native b/fixtures/annotations.py.native similarity index 100% rename from tests/annotations.py.native rename to fixtures/annotations.py.native diff --git a/tests/annotations.py.source b/fixtures/annotations.py.source similarity index 100% rename from tests/annotations.py.source rename to fixtures/annotations.py.source diff --git a/tests/annotations.py.uast b/fixtures/annotations.py.uast similarity index 100% rename from tests/annotations.py.uast rename to fixtures/annotations.py.uast diff --git a/tests/aritmeticops.py.native b/fixtures/aritmeticops.py.native similarity index 100% rename from tests/aritmeticops.py.native rename to fixtures/aritmeticops.py.native diff --git a/tests/aritmeticops.py.source b/fixtures/aritmeticops.py.source similarity index 100% rename from tests/aritmeticops.py.source rename to fixtures/aritmeticops.py.source diff --git a/tests/aritmeticops.py.uast b/fixtures/aritmeticops.py.uast similarity index 100% rename from tests/aritmeticops.py.uast rename to fixtures/aritmeticops.py.uast diff --git a/tests/assert_constant.py.native b/fixtures/assert_constant.py.native similarity index 100% rename from tests/assert_constant.py.native rename to fixtures/assert_constant.py.native diff --git a/tests/assert_constant.py.source b/fixtures/assert_constant.py.source similarity index 100% rename from tests/assert_constant.py.source rename to fixtures/assert_constant.py.source diff --git a/tests/assert_constant.py.uast b/fixtures/assert_constant.py.uast similarity index 100% rename from tests/assert_constant.py.uast rename to fixtures/assert_constant.py.uast diff --git a/tests/augassign.py.native b/fixtures/augassign.py.native similarity index 100% rename from tests/augassign.py.native rename to fixtures/augassign.py.native diff --git a/tests/augassign.py.source b/fixtures/augassign.py.source similarity index 100% rename from tests/augassign.py.source rename to fixtures/augassign.py.source diff --git a/tests/augassign.py.uast b/fixtures/augassign.py.uast similarity index 100% rename from tests/augassign.py.uast rename to fixtures/augassign.py.uast diff --git a/tests/bitwise.py.native b/fixtures/bitwise.py.native similarity index 100% rename from tests/bitwise.py.native rename to fixtures/bitwise.py.native diff --git a/tests/bitwise.py.source b/fixtures/bitwise.py.source similarity index 100% rename from tests/bitwise.py.source rename to fixtures/bitwise.py.source diff --git a/tests/bitwise.py.uast b/fixtures/bitwise.py.uast similarity index 100% rename from tests/bitwise.py.uast rename to fixtures/bitwise.py.uast diff --git a/tests/classdef.py.native b/fixtures/classdef.py.native similarity index 100% rename from tests/classdef.py.native rename to fixtures/classdef.py.native diff --git a/tests/classdef.py.source b/fixtures/classdef.py.source similarity index 100% rename from tests/classdef.py.source rename to fixtures/classdef.py.source diff --git a/tests/classdef.py.uast b/fixtures/classdef.py.uast similarity index 100% rename from tests/classdef.py.uast rename to fixtures/classdef.py.uast diff --git a/tests/classdef_decorated.py.native b/fixtures/classdef_decorated.py.native similarity index 100% rename from tests/classdef_decorated.py.native rename to fixtures/classdef_decorated.py.native diff --git a/tests/classdef_decorated.py.source b/fixtures/classdef_decorated.py.source similarity index 100% rename from tests/classdef_decorated.py.source rename to fixtures/classdef_decorated.py.source diff --git a/tests/classdef_decorated.py.uast b/fixtures/classdef_decorated.py.uast similarity index 100% rename from tests/classdef_decorated.py.uast rename to fixtures/classdef_decorated.py.uast diff --git a/tests/classdef_inheritance.py.native b/fixtures/classdef_inheritance.py.native similarity index 100% rename from tests/classdef_inheritance.py.native rename to fixtures/classdef_inheritance.py.native diff --git a/tests/classdef_inheritance.py.source b/fixtures/classdef_inheritance.py.source similarity index 100% rename from tests/classdef_inheritance.py.source rename to fixtures/classdef_inheritance.py.source diff --git a/tests/classdef_inheritance.py.uast b/fixtures/classdef_inheritance.py.uast similarity index 100% rename from tests/classdef_inheritance.py.uast rename to fixtures/classdef_inheritance.py.uast diff --git a/tests/classdef_metaclass_py2.py.native b/fixtures/classdef_metaclass_py2.py.native similarity index 100% rename from tests/classdef_metaclass_py2.py.native rename to fixtures/classdef_metaclass_py2.py.native diff --git a/tests/classdef_metaclass_py2.py.source b/fixtures/classdef_metaclass_py2.py.source similarity index 100% rename from tests/classdef_metaclass_py2.py.source rename to fixtures/classdef_metaclass_py2.py.source diff --git a/tests/classdef_metaclass_py2.py.uast b/fixtures/classdef_metaclass_py2.py.uast similarity index 100% rename from tests/classdef_metaclass_py2.py.uast rename to fixtures/classdef_metaclass_py2.py.uast diff --git a/tests/classdef_metaclass_py3.py.native b/fixtures/classdef_metaclass_py3.py.native similarity index 100% rename from tests/classdef_metaclass_py3.py.native rename to fixtures/classdef_metaclass_py3.py.native diff --git a/tests/classdef_metaclass_py3.py.source b/fixtures/classdef_metaclass_py3.py.source similarity index 100% rename from tests/classdef_metaclass_py3.py.source rename to fixtures/classdef_metaclass_py3.py.source diff --git a/tests/classdef_metaclass_py3.py.uast b/fixtures/classdef_metaclass_py3.py.uast similarity index 100% rename from tests/classdef_metaclass_py3.py.uast rename to fixtures/classdef_metaclass_py3.py.uast diff --git a/tests/comments.py.native b/fixtures/comments.py.native similarity index 100% rename from tests/comments.py.native rename to fixtures/comments.py.native diff --git a/tests/comments.py.source b/fixtures/comments.py.source similarity index 100% rename from tests/comments.py.source rename to fixtures/comments.py.source diff --git a/tests/comments.py.uast b/fixtures/comments.py.uast similarity index 100% rename from tests/comments.py.uast rename to fixtures/comments.py.uast diff --git a/tests/comparisonop.py.native b/fixtures/comparisonop.py.native similarity index 100% rename from tests/comparisonop.py.native rename to fixtures/comparisonop.py.native diff --git a/tests/comparisonop.py.source b/fixtures/comparisonop.py.source similarity index 100% rename from tests/comparisonop.py.source rename to fixtures/comparisonop.py.source diff --git a/tests/comparisonop.py.uast b/fixtures/comparisonop.py.uast similarity index 100% rename from tests/comparisonop.py.uast rename to fixtures/comparisonop.py.uast diff --git a/tests/complex.py.native b/fixtures/complex.py.native similarity index 100% rename from tests/complex.py.native rename to fixtures/complex.py.native diff --git a/tests/complex.py.source b/fixtures/complex.py.source similarity index 100% rename from tests/complex.py.source rename to fixtures/complex.py.source diff --git a/tests/complex.py.uast b/fixtures/complex.py.uast similarity index 100% rename from tests/complex.py.uast rename to fixtures/complex.py.uast diff --git a/tests/comprehension_dict.py.native b/fixtures/comprehension_dict.py.native similarity index 100% rename from tests/comprehension_dict.py.native rename to fixtures/comprehension_dict.py.native diff --git a/tests/comprehension_dict.py.source b/fixtures/comprehension_dict.py.source similarity index 100% rename from tests/comprehension_dict.py.source rename to fixtures/comprehension_dict.py.source diff --git a/tests/comprehension_dict.py.uast b/fixtures/comprehension_dict.py.uast similarity index 100% rename from tests/comprehension_dict.py.uast rename to fixtures/comprehension_dict.py.uast diff --git a/tests/comprehension_list.py.native b/fixtures/comprehension_list.py.native similarity index 100% rename from tests/comprehension_list.py.native rename to fixtures/comprehension_list.py.native diff --git a/tests/comprehension_list.py.source b/fixtures/comprehension_list.py.source similarity index 100% rename from tests/comprehension_list.py.source rename to fixtures/comprehension_list.py.source diff --git a/tests/comprehension_list.py.uast b/fixtures/comprehension_list.py.uast similarity index 100% rename from tests/comprehension_list.py.uast rename to fixtures/comprehension_list.py.uast diff --git a/tests/comprehension_set.py.native b/fixtures/comprehension_set.py.native similarity index 100% rename from tests/comprehension_set.py.native rename to fixtures/comprehension_set.py.native diff --git a/tests/comprehension_set.py.source b/fixtures/comprehension_set.py.source similarity index 100% rename from tests/comprehension_set.py.source rename to fixtures/comprehension_set.py.source diff --git a/tests/comprehension_set.py.uast b/fixtures/comprehension_set.py.uast similarity index 100% rename from tests/comprehension_set.py.uast rename to fixtures/comprehension_set.py.uast diff --git a/tests/continue_break.py.native b/fixtures/continue_break.py.native similarity index 100% rename from tests/continue_break.py.native rename to fixtures/continue_break.py.native diff --git a/tests/continue_break.py.source b/fixtures/continue_break.py.source similarity index 100% rename from tests/continue_break.py.source rename to fixtures/continue_break.py.source diff --git a/tests/continue_break.py.uast b/fixtures/continue_break.py.uast similarity index 100% rename from tests/continue_break.py.uast rename to fixtures/continue_break.py.uast diff --git a/tests/declarations_annotated.py.native b/fixtures/declarations_annotated.py.native similarity index 100% rename from tests/declarations_annotated.py.native rename to fixtures/declarations_annotated.py.native diff --git a/tests/declarations_annotated.py.source b/fixtures/declarations_annotated.py.source similarity index 100% rename from tests/declarations_annotated.py.source rename to fixtures/declarations_annotated.py.source diff --git a/tests/declarations_annotated.py.uast b/fixtures/declarations_annotated.py.uast similarity index 100% rename from tests/declarations_annotated.py.uast rename to fixtures/declarations_annotated.py.uast diff --git a/tests/ellipsis.py.native b/fixtures/ellipsis.py.native similarity index 100% rename from tests/ellipsis.py.native rename to fixtures/ellipsis.py.native diff --git a/tests/ellipsis.py.source b/fixtures/ellipsis.py.source similarity index 100% rename from tests/ellipsis.py.source rename to fixtures/ellipsis.py.source diff --git a/tests/ellipsis.py.uast b/fixtures/ellipsis.py.uast similarity index 100% rename from tests/ellipsis.py.uast rename to fixtures/ellipsis.py.uast diff --git a/tests/empty.py.native b/fixtures/empty.py.native similarity index 100% rename from tests/empty.py.native rename to fixtures/empty.py.native diff --git a/tests/empty.py.source b/fixtures/empty.py.source similarity index 100% rename from tests/empty.py.source rename to fixtures/empty.py.source diff --git a/tests/empty.py.uast b/fixtures/empty.py.uast similarity index 100% rename from tests/empty.py.uast rename to fixtures/empty.py.uast diff --git a/tests/except.py.native b/fixtures/except.py.native similarity index 100% rename from tests/except.py.native rename to fixtures/except.py.native diff --git a/tests/except.py.source b/fixtures/except.py.source similarity index 100% rename from tests/except.py.source rename to fixtures/except.py.source diff --git a/tests/except.py.uast b/fixtures/except.py.uast similarity index 100% rename from tests/except.py.uast rename to fixtures/except.py.uast diff --git a/tests/exec.py.native b/fixtures/exec.py.native similarity index 100% rename from tests/exec.py.native rename to fixtures/exec.py.native diff --git a/tests/exec.py.source b/fixtures/exec.py.source similarity index 100% rename from tests/exec.py.source rename to fixtures/exec.py.source diff --git a/tests/exec.py.uast b/fixtures/exec.py.uast similarity index 100% rename from tests/exec.py.uast rename to fixtures/exec.py.uast diff --git a/tests/for.py.native b/fixtures/for.py.native similarity index 100% rename from tests/for.py.native rename to fixtures/for.py.native diff --git a/tests/for.py.source b/fixtures/for.py.source similarity index 100% rename from tests/for.py.source rename to fixtures/for.py.source diff --git a/tests/for.py.uast b/fixtures/for.py.uast similarity index 100% rename from tests/for.py.uast rename to fixtures/for.py.uast diff --git a/tests/functioncalls.py.native b/fixtures/functioncalls.py.native similarity index 100% rename from tests/functioncalls.py.native rename to fixtures/functioncalls.py.native diff --git a/tests/functioncalls.py.source b/fixtures/functioncalls.py.source similarity index 100% rename from tests/functioncalls.py.source rename to fixtures/functioncalls.py.source diff --git a/tests/functioncalls.py.uast b/fixtures/functioncalls.py.uast similarity index 100% rename from tests/functioncalls.py.uast rename to fixtures/functioncalls.py.uast diff --git a/tests/functiondef_annotated.py.native b/fixtures/functiondef_annotated.py.native similarity index 100% rename from tests/functiondef_annotated.py.native rename to fixtures/functiondef_annotated.py.native diff --git a/tests/functiondef_annotated.py.source b/fixtures/functiondef_annotated.py.source similarity index 100% rename from tests/functiondef_annotated.py.source rename to fixtures/functiondef_annotated.py.source diff --git a/tests/functiondef_annotated.py.uast b/fixtures/functiondef_annotated.py.uast similarity index 100% rename from tests/functiondef_annotated.py.uast rename to fixtures/functiondef_annotated.py.uast diff --git a/tests/functiondef_decorated.py.native b/fixtures/functiondef_decorated.py.native similarity index 100% rename from tests/functiondef_decorated.py.native rename to fixtures/functiondef_decorated.py.native diff --git a/tests/functiondef_decorated.py.source b/fixtures/functiondef_decorated.py.source similarity index 100% rename from tests/functiondef_decorated.py.source rename to fixtures/functiondef_decorated.py.source diff --git a/tests/functiondef_decorated.py.uast b/fixtures/functiondef_decorated.py.uast similarity index 100% rename from tests/functiondef_decorated.py.uast rename to fixtures/functiondef_decorated.py.uast diff --git a/tests/functiondef_defaultparams.py.native b/fixtures/functiondef_defaultparams.py.native similarity index 100% rename from tests/functiondef_defaultparams.py.native rename to fixtures/functiondef_defaultparams.py.native diff --git a/tests/functiondef_defaultparams.py.source b/fixtures/functiondef_defaultparams.py.source similarity index 100% rename from tests/functiondef_defaultparams.py.source rename to fixtures/functiondef_defaultparams.py.source diff --git a/tests/functiondef_defaultparams.py.uast b/fixtures/functiondef_defaultparams.py.uast similarity index 100% rename from tests/functiondef_defaultparams.py.uast rename to fixtures/functiondef_defaultparams.py.uast diff --git a/tests/functiondef_docstring.py.native b/fixtures/functiondef_docstring.py.native similarity index 100% rename from tests/functiondef_docstring.py.native rename to fixtures/functiondef_docstring.py.native diff --git a/tests/functiondef_docstring.py.source b/fixtures/functiondef_docstring.py.source similarity index 100% rename from tests/functiondef_docstring.py.source rename to fixtures/functiondef_docstring.py.source diff --git a/tests/functiondef_docstring.py.uast b/fixtures/functiondef_docstring.py.uast similarity index 100% rename from tests/functiondef_docstring.py.uast rename to fixtures/functiondef_docstring.py.uast diff --git a/tests/functiondef_kwarg.py.native b/fixtures/functiondef_kwarg.py.native similarity index 100% rename from tests/functiondef_kwarg.py.native rename to fixtures/functiondef_kwarg.py.native diff --git a/tests/functiondef_kwarg.py.source b/fixtures/functiondef_kwarg.py.source similarity index 100% rename from tests/functiondef_kwarg.py.source rename to fixtures/functiondef_kwarg.py.source diff --git a/tests/functiondef_kwarg.py.uast b/fixtures/functiondef_kwarg.py.uast similarity index 100% rename from tests/functiondef_kwarg.py.uast rename to fixtures/functiondef_kwarg.py.uast diff --git a/tests/functiondef_simple.py.native b/fixtures/functiondef_simple.py.native similarity index 100% rename from tests/functiondef_simple.py.native rename to fixtures/functiondef_simple.py.native diff --git a/tests/functiondef_simple.py.source b/fixtures/functiondef_simple.py.source similarity index 100% rename from tests/functiondef_simple.py.source rename to fixtures/functiondef_simple.py.source diff --git a/tests/functiondef_simple.py.uast b/fixtures/functiondef_simple.py.uast similarity index 100% rename from tests/functiondef_simple.py.uast rename to fixtures/functiondef_simple.py.uast diff --git a/tests/functiondef_vararg.py.native b/fixtures/functiondef_vararg.py.native similarity index 100% rename from tests/functiondef_vararg.py.native rename to fixtures/functiondef_vararg.py.native diff --git a/tests/functiondef_vararg.py.source b/fixtures/functiondef_vararg.py.source similarity index 100% rename from tests/functiondef_vararg.py.source rename to fixtures/functiondef_vararg.py.source diff --git a/tests/functiondef_vararg.py.uast b/fixtures/functiondef_vararg.py.uast similarity index 100% rename from tests/functiondef_vararg.py.uast rename to fixtures/functiondef_vararg.py.uast diff --git a/tests/hello.py.native b/fixtures/hello.py.native similarity index 100% rename from tests/hello.py.native rename to fixtures/hello.py.native diff --git a/tests/hello.py.source b/fixtures/hello.py.source similarity index 100% rename from tests/hello.py.source rename to fixtures/hello.py.source diff --git a/tests/hello.py.uast b/fixtures/hello.py.uast similarity index 100% rename from tests/hello.py.uast rename to fixtures/hello.py.uast diff --git a/tests/if.py.native b/fixtures/if.py.native similarity index 100% rename from tests/if.py.native rename to fixtures/if.py.native diff --git a/tests/if.py.source b/fixtures/if.py.source similarity index 100% rename from tests/if.py.source rename to fixtures/if.py.source diff --git a/tests/if.py.uast b/fixtures/if.py.uast similarity index 100% rename from tests/if.py.uast rename to fixtures/if.py.uast diff --git a/tests/ifexpression.py.native b/fixtures/ifexpression.py.native similarity index 100% rename from tests/ifexpression.py.native rename to fixtures/ifexpression.py.native diff --git a/tests/ifexpression.py.source b/fixtures/ifexpression.py.source similarity index 100% rename from tests/ifexpression.py.source rename to fixtures/ifexpression.py.source diff --git a/tests/ifexpression.py.uast b/fixtures/ifexpression.py.uast similarity index 100% rename from tests/ifexpression.py.uast rename to fixtures/ifexpression.py.uast diff --git a/tests/import.py.native b/fixtures/import.py.native similarity index 100% rename from tests/import.py.native rename to fixtures/import.py.native diff --git a/tests/import.py.source b/fixtures/import.py.source similarity index 100% rename from tests/import.py.source rename to fixtures/import.py.source diff --git a/tests/import.py.uast b/fixtures/import.py.uast similarity index 100% rename from tests/import.py.uast rename to fixtures/import.py.uast diff --git a/tests/issue30.py.native b/fixtures/issue30.py.native similarity index 100% rename from tests/issue30.py.native rename to fixtures/issue30.py.native diff --git a/tests/issue30.py.source b/fixtures/issue30.py.source similarity index 100% rename from tests/issue30.py.source rename to fixtures/issue30.py.source diff --git a/tests/issue30.py.uast b/fixtures/issue30.py.uast similarity index 100% rename from tests/issue30.py.uast rename to fixtures/issue30.py.uast diff --git a/tests/issue51.py.native b/fixtures/issue51.py.native similarity index 100% rename from tests/issue51.py.native rename to fixtures/issue51.py.native diff --git a/tests/issue51.py.source b/fixtures/issue51.py.source similarity index 100% rename from tests/issue51.py.source rename to fixtures/issue51.py.source diff --git a/tests/issue51.py.uast b/fixtures/issue51.py.uast similarity index 100% rename from tests/issue51.py.uast rename to fixtures/issue51.py.uast diff --git a/tests/issue58.py.native b/fixtures/issue58.py.native similarity index 100% rename from tests/issue58.py.native rename to fixtures/issue58.py.native diff --git a/tests/issue58.py.source b/fixtures/issue58.py.source similarity index 100% rename from tests/issue58.py.source rename to fixtures/issue58.py.source diff --git a/tests/issue58.py.uast b/fixtures/issue58.py.uast similarity index 100% rename from tests/issue58.py.uast rename to fixtures/issue58.py.uast diff --git a/tests/issue62.py.native b/fixtures/issue62.py.native similarity index 100% rename from tests/issue62.py.native rename to fixtures/issue62.py.native diff --git a/tests/issue62.py.source b/fixtures/issue62.py.source similarity index 100% rename from tests/issue62.py.source rename to fixtures/issue62.py.source diff --git a/tests/issue62.py.uast b/fixtures/issue62.py.uast similarity index 100% rename from tests/issue62.py.uast rename to fixtures/issue62.py.uast diff --git a/tests/issue62_b.py.native b/fixtures/issue62_b.py.native similarity index 100% rename from tests/issue62_b.py.native rename to fixtures/issue62_b.py.native diff --git a/tests/issue62_b.py.source b/fixtures/issue62_b.py.source similarity index 100% rename from tests/issue62_b.py.source rename to fixtures/issue62_b.py.source diff --git a/tests/issue62_b.py.uast b/fixtures/issue62_b.py.uast similarity index 100% rename from tests/issue62_b.py.uast rename to fixtures/issue62_b.py.uast diff --git a/tests/issue76.py.native b/fixtures/issue76.py.native similarity index 100% rename from tests/issue76.py.native rename to fixtures/issue76.py.native diff --git a/tests/issue76.py.source b/fixtures/issue76.py.source similarity index 100% rename from tests/issue76.py.source rename to fixtures/issue76.py.source diff --git a/tests/issue76.py.uast b/fixtures/issue76.py.uast similarity index 100% rename from tests/issue76.py.uast rename to fixtures/issue76.py.uast diff --git a/tests/issue_server101.py.native b/fixtures/issue_server101.py.native similarity index 100% rename from tests/issue_server101.py.native rename to fixtures/issue_server101.py.native diff --git a/tests/issue_server101.py.source b/fixtures/issue_server101.py.source similarity index 100% rename from tests/issue_server101.py.source rename to fixtures/issue_server101.py.source diff --git a/tests/issue_server101.py.uast b/fixtures/issue_server101.py.uast similarity index 100% rename from tests/issue_server101.py.uast rename to fixtures/issue_server101.py.uast diff --git a/tests/lambda.py.native b/fixtures/lambda.py.native similarity index 100% rename from tests/lambda.py.native rename to fixtures/lambda.py.native diff --git a/tests/lambda.py.source b/fixtures/lambda.py.source similarity index 100% rename from tests/lambda.py.source rename to fixtures/lambda.py.source diff --git a/tests/lambda.py.uast b/fixtures/lambda.py.uast similarity index 100% rename from tests/lambda.py.uast rename to fixtures/lambda.py.uast diff --git a/tests/line_comment.py.native b/fixtures/line_comment.py.native similarity index 100% rename from tests/line_comment.py.native rename to fixtures/line_comment.py.native diff --git a/tests/line_comment.py.source b/fixtures/line_comment.py.source similarity index 100% rename from tests/line_comment.py.source rename to fixtures/line_comment.py.source diff --git a/tests/line_comment.py.uast b/fixtures/line_comment.py.uast similarity index 100% rename from tests/line_comment.py.uast rename to fixtures/line_comment.py.uast diff --git a/tests/literals_assign.py.native b/fixtures/literals_assign.py.native similarity index 100% rename from tests/literals_assign.py.native rename to fixtures/literals_assign.py.native diff --git a/tests/literals_assign.py.source b/fixtures/literals_assign.py.source similarity index 100% rename from tests/literals_assign.py.source rename to fixtures/literals_assign.py.source diff --git a/tests/literals_assign.py.uast b/fixtures/literals_assign.py.uast similarity index 100% rename from tests/literals_assign.py.uast rename to fixtures/literals_assign.py.uast diff --git a/tests/loop_if.py.native b/fixtures/loop_if.py.native similarity index 100% rename from tests/loop_if.py.native rename to fixtures/loop_if.py.native diff --git a/tests/loop_if.py.source b/fixtures/loop_if.py.source similarity index 100% rename from tests/loop_if.py.source rename to fixtures/loop_if.py.source diff --git a/tests/loop_if.py.uast b/fixtures/loop_if.py.uast similarity index 100% rename from tests/loop_if.py.uast rename to fixtures/loop_if.py.uast diff --git a/tests/other_statements.py.native b/fixtures/other_statements.py.native similarity index 100% rename from tests/other_statements.py.native rename to fixtures/other_statements.py.native diff --git a/tests/other_statements.py.source b/fixtures/other_statements.py.source similarity index 100% rename from tests/other_statements.py.source rename to fixtures/other_statements.py.source diff --git a/tests/other_statements.py.uast b/fixtures/other_statements.py.uast similarity index 100% rename from tests/other_statements.py.uast rename to fixtures/other_statements.py.uast diff --git a/tests/pass.py.native b/fixtures/pass.py.native similarity index 100% rename from tests/pass.py.native rename to fixtures/pass.py.native diff --git a/tests/pass.py.source b/fixtures/pass.py.source similarity index 100% rename from tests/pass.py.source rename to fixtures/pass.py.source diff --git a/tests/pass.py.uast b/fixtures/pass.py.uast similarity index 100% rename from tests/pass.py.uast rename to fixtures/pass.py.uast diff --git a/tests/print.py.native b/fixtures/print.py.native similarity index 100% rename from tests/print.py.native rename to fixtures/print.py.native diff --git a/tests/print.py.source b/fixtures/print.py.source similarity index 100% rename from tests/print.py.source rename to fixtures/print.py.source diff --git a/tests/print.py.uast b/fixtures/print.py.uast similarity index 100% rename from tests/print.py.uast rename to fixtures/print.py.uast diff --git a/tests/qualified.py.native b/fixtures/qualified.py.native similarity index 100% rename from tests/qualified.py.native rename to fixtures/qualified.py.native diff --git a/tests/qualified.py.source b/fixtures/qualified.py.source similarity index 100% rename from tests/qualified.py.source rename to fixtures/qualified.py.source diff --git a/tests/qualified.py.uast b/fixtures/qualified.py.uast similarity index 100% rename from tests/qualified.py.uast rename to fixtures/qualified.py.uast diff --git a/tests/regenerate_tests.sh b/fixtures/regenerate_tests.sh similarity index 100% rename from tests/regenerate_tests.sh rename to fixtures/regenerate_tests.sh diff --git a/tests/repr.py.native b/fixtures/repr.py.native similarity index 100% rename from tests/repr.py.native rename to fixtures/repr.py.native diff --git a/tests/repr.py.source b/fixtures/repr.py.source similarity index 100% rename from tests/repr.py.source rename to fixtures/repr.py.source diff --git a/tests/repr.py.uast b/fixtures/repr.py.uast similarity index 100% rename from tests/repr.py.uast rename to fixtures/repr.py.uast diff --git a/tests/rolenumbers.txt b/fixtures/rolenumbers.txt similarity index 100% rename from tests/rolenumbers.txt rename to fixtures/rolenumbers.txt diff --git a/tests/sameline.py.native b/fixtures/sameline.py.native similarity index 100% rename from tests/sameline.py.native rename to fixtures/sameline.py.native diff --git a/tests/sameline.py.source b/fixtures/sameline.py.source similarity index 100% rename from tests/sameline.py.source rename to fixtures/sameline.py.source diff --git a/tests/sameline.py.uast b/fixtures/sameline.py.uast similarity index 100% rename from tests/sameline.py.uast rename to fixtures/sameline.py.uast diff --git a/tests/sorting.py.native b/fixtures/sorting.py.native similarity index 100% rename from tests/sorting.py.native rename to fixtures/sorting.py.native diff --git a/tests/sorting.py.source b/fixtures/sorting.py.source similarity index 100% rename from tests/sorting.py.source rename to fixtures/sorting.py.source diff --git a/tests/sorting.py.uast b/fixtures/sorting.py.uast similarity index 100% rename from tests/sorting.py.uast rename to fixtures/sorting.py.uast diff --git a/tests/string_fstring.py.native b/fixtures/string_fstring.py.native similarity index 100% rename from tests/string_fstring.py.native rename to fixtures/string_fstring.py.native diff --git a/tests/string_fstring.py.source b/fixtures/string_fstring.py.source similarity index 100% rename from tests/string_fstring.py.source rename to fixtures/string_fstring.py.source diff --git a/tests/string_fstring.py.uast b/fixtures/string_fstring.py.uast similarity index 100% rename from tests/string_fstring.py.uast rename to fixtures/string_fstring.py.uast diff --git a/tests/string_normal.py.native b/fixtures/string_normal.py.native similarity index 100% rename from tests/string_normal.py.native rename to fixtures/string_normal.py.native diff --git a/tests/string_normal.py.source b/fixtures/string_normal.py.source similarity index 100% rename from tests/string_normal.py.source rename to fixtures/string_normal.py.source diff --git a/tests/string_normal.py.uast b/fixtures/string_normal.py.uast similarity index 100% rename from tests/string_normal.py.uast rename to fixtures/string_normal.py.uast diff --git a/tests/string_triple.py.native b/fixtures/string_triple.py.native similarity index 100% rename from tests/string_triple.py.native rename to fixtures/string_triple.py.native diff --git a/tests/string_triple.py.source b/fixtures/string_triple.py.source similarity index 100% rename from tests/string_triple.py.source rename to fixtures/string_triple.py.source diff --git a/tests/string_triple.py.uast b/fixtures/string_triple.py.uast similarity index 100% rename from tests/string_triple.py.uast rename to fixtures/string_triple.py.uast diff --git a/tests/test.py.native b/fixtures/test.py.native similarity index 100% rename from tests/test.py.native rename to fixtures/test.py.native diff --git a/tests/test.py.source b/fixtures/test.py.source similarity index 100% rename from tests/test.py.source rename to fixtures/test.py.source diff --git a/tests/test.py.uast b/fixtures/test.py.uast similarity index 100% rename from tests/test.py.uast rename to fixtures/test.py.uast diff --git a/tests/unary.py.native b/fixtures/unary.py.native similarity index 100% rename from tests/unary.py.native rename to fixtures/unary.py.native diff --git a/tests/unary.py.source b/fixtures/unary.py.source similarity index 100% rename from tests/unary.py.source rename to fixtures/unary.py.source diff --git a/tests/unary.py.uast b/fixtures/unary.py.uast similarity index 100% rename from tests/unary.py.uast rename to fixtures/unary.py.uast diff --git a/tests/while.py.native b/fixtures/while.py.native similarity index 100% rename from tests/while.py.native rename to fixtures/while.py.native diff --git a/tests/while.py.source b/fixtures/while.py.source similarity index 100% rename from tests/while.py.source rename to fixtures/while.py.source diff --git a/tests/while.py.uast b/fixtures/while.py.uast similarity index 100% rename from tests/while.py.uast rename to fixtures/while.py.uast diff --git a/tests/with.py.native b/fixtures/with.py.native similarity index 100% rename from tests/with.py.native rename to fixtures/with.py.native diff --git a/tests/with.py.source b/fixtures/with.py.source similarity index 100% rename from tests/with.py.source rename to fixtures/with.py.source diff --git a/tests/with.py.uast b/fixtures/with.py.uast similarity index 100% rename from tests/with.py.uast rename to fixtures/with.py.uast