2018-07-24 00:24:36 +03:00
|
|
|
// This file was generated by proto-gen. Do not edit by hand.
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package github.semantic.python_terms;
|
|
|
|
|
|
|
|
import "types.proto";
|
|
|
|
|
|
|
|
option java_package = "com.github.semantic.python_terms";
|
|
|
|
option go_package = "github.com/semantic/python_terms;python";
|
|
|
|
|
|
|
|
message PythonTerm {
|
|
|
|
PythonSyntax syntax = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message QualifiedName {
|
|
|
|
oneof sum {
|
|
|
|
QualifiedName qualifiedName = 1;
|
|
|
|
RelativeQualifiedName relativeQualifiedName = 2;
|
|
|
|
}
|
|
|
|
message QualifiedName {
|
|
|
|
repeated string paths = 1;
|
|
|
|
}
|
|
|
|
message RelativeQualifiedName {
|
|
|
|
string path = 1;
|
|
|
|
QualifiedName maybeQualifiedName = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-24 00:35:29 +03:00
|
|
|
message Alias {
|
|
|
|
bytes aliasValue = 1;
|
|
|
|
bytes aliasName = 2;
|
|
|
|
}
|
|
|
|
|
2018-07-24 00:24:36 +03:00
|
|
|
message PythonSyntax {
|
|
|
|
oneof syntax {
|
|
|
|
Comment comment = 1;
|
|
|
|
Class class = 2;
|
|
|
|
Comprehension comprehension = 3;
|
|
|
|
Decorator decorator = 4;
|
|
|
|
Function function = 5;
|
|
|
|
Variable variable = 6;
|
|
|
|
Plus plus = 7;
|
|
|
|
Minus minus = 8;
|
|
|
|
Times times = 9;
|
|
|
|
DividedBy dividedBy = 10;
|
|
|
|
Modulo modulo = 11;
|
|
|
|
Power power = 12;
|
|
|
|
Negate negate = 13;
|
|
|
|
FloorDivision floorDivision = 14;
|
|
|
|
And and = 15;
|
|
|
|
Not not = 16;
|
|
|
|
Or or = 17;
|
|
|
|
XOr xOr = 18;
|
|
|
|
BAnd bAnd = 19;
|
|
|
|
BOr bOr = 20;
|
|
|
|
BXOr bXOr = 21;
|
|
|
|
LShift lShift = 22;
|
|
|
|
RShift rShift = 23;
|
|
|
|
Complement complement = 24;
|
|
|
|
Call call = 25;
|
|
|
|
LessThan lessThan = 26;
|
|
|
|
LessThanEqual lessThanEqual = 27;
|
|
|
|
GreaterThan greaterThan = 28;
|
|
|
|
GreaterThanEqual greaterThanEqual = 29;
|
|
|
|
Equal equal = 30;
|
|
|
|
StrictEqual strictEqual = 31;
|
|
|
|
Comparison comparison = 32;
|
|
|
|
Enumeration enumeration = 33;
|
|
|
|
ScopeResolution scopeResolution = 34;
|
|
|
|
MemberAccess memberAccess = 35;
|
|
|
|
Subscript subscript = 36;
|
|
|
|
Member member = 37;
|
|
|
|
Array array = 38;
|
|
|
|
Boolean boolean = 39;
|
|
|
|
Float float = 40;
|
|
|
|
Hash hash = 41;
|
|
|
|
Integer integer = 42;
|
|
|
|
KeyValue keyValue = 43;
|
|
|
|
Null null = 44;
|
|
|
|
Set set = 45;
|
|
|
|
String string = 46;
|
|
|
|
TextElement textElement = 47;
|
|
|
|
Tuple tuple = 48;
|
2018-08-10 20:39:03 +03:00
|
|
|
Ellipsis ellipsis = 49;
|
|
|
|
FutureImport futureImport = 50;
|
|
|
|
Import import = 51;
|
|
|
|
QualifiedImport qualifiedImport = 52;
|
|
|
|
QualifiedAliasedImport qualifiedAliasedImport = 53;
|
|
|
|
Redirect redirect = 54;
|
|
|
|
Assignment assignment = 55;
|
|
|
|
Break break = 56;
|
|
|
|
Catch catch = 57;
|
|
|
|
Continue continue = 58;
|
|
|
|
Else else = 59;
|
|
|
|
Finally finally = 60;
|
|
|
|
ForEach forEach = 61;
|
|
|
|
If if = 62;
|
|
|
|
Let let = 63;
|
|
|
|
NoOp noOp = 64;
|
|
|
|
Return return = 65;
|
|
|
|
Statements statements = 66;
|
|
|
|
Throw throw = 67;
|
|
|
|
Try try = 68;
|
|
|
|
While while = 69;
|
|
|
|
Yield yield = 70;
|
|
|
|
Context context = 71;
|
|
|
|
Empty empty = 72;
|
|
|
|
Error error = 73;
|
|
|
|
Identifier identifier = 74;
|
|
|
|
Annotation annotation = 75;
|
|
|
|
List list = 76;
|
2018-07-24 00:24:36 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message Comment {
|
|
|
|
string commentContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Class {
|
|
|
|
repeated PythonTerm classContext = 1;
|
|
|
|
PythonTerm classIdentifier = 2;
|
|
|
|
repeated PythonTerm classSuperclasses = 3;
|
|
|
|
PythonTerm classBody = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Comprehension {
|
|
|
|
PythonTerm comprehensionValue = 1;
|
|
|
|
PythonTerm comprehensionBody = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Decorator {
|
|
|
|
PythonTerm decoratorIdentifier = 1;
|
|
|
|
repeated PythonTerm decoratorParamaters = 2;
|
|
|
|
PythonTerm decoratorBody = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Function {
|
|
|
|
repeated PythonTerm functionContext = 1;
|
|
|
|
PythonTerm functionName = 2;
|
|
|
|
repeated PythonTerm functionParameters = 3;
|
|
|
|
PythonTerm functionBody = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Variable {
|
|
|
|
PythonTerm variableName = 1;
|
|
|
|
PythonTerm variableType = 2;
|
|
|
|
PythonTerm variableValue = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Plus {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Minus {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Times {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DividedBy {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Modulo {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Power {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Negate {
|
2018-08-08 19:39:17 +03:00
|
|
|
PythonTerm value = 1;
|
2018-07-24 00:24:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message FloorDivision {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message And {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Not {
|
2018-08-08 19:39:17 +03:00
|
|
|
PythonTerm value = 1;
|
2018-07-24 00:24:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Or {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message XOr {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BAnd {
|
|
|
|
PythonTerm left = 1;
|
|
|
|
PythonTerm right = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BOr {
|
|
|
|
PythonTerm left = 1;
|
|
|
|
PythonTerm right = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BXOr {
|
|
|
|
PythonTerm left = 1;
|
|
|
|
PythonTerm right = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LShift {
|
|
|
|
PythonTerm left = 1;
|
|
|
|
PythonTerm right = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RShift {
|
|
|
|
PythonTerm left = 1;
|
|
|
|
PythonTerm right = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Complement {
|
|
|
|
PythonTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Call {
|
|
|
|
repeated PythonTerm callContext = 1;
|
|
|
|
PythonTerm callFunction = 2;
|
|
|
|
repeated PythonTerm callParams = 3;
|
|
|
|
PythonTerm callBlock = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LessThan {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LessThanEqual {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GreaterThan {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GreaterThanEqual {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Equal {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StrictEqual {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Comparison {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Enumeration {
|
|
|
|
PythonTerm enumerationStart = 1;
|
|
|
|
PythonTerm enumerationEnd = 2;
|
|
|
|
PythonTerm enumerationStep = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ScopeResolution {
|
|
|
|
repeated PythonTerm scopes = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MemberAccess {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
bytes rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Subscript {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
repeated PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Member {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Array {
|
|
|
|
repeated PythonTerm arrayElements = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Boolean {
|
|
|
|
bool booleanContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Float {
|
|
|
|
string floatContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Hash {
|
|
|
|
repeated PythonTerm hashElements = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Integer {
|
|
|
|
string integerContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message KeyValue {
|
|
|
|
PythonTerm key = 1;
|
|
|
|
PythonTerm value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Null { }
|
|
|
|
|
|
|
|
message Set {
|
|
|
|
repeated PythonTerm setElements = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message String {
|
|
|
|
repeated PythonTerm stringElements = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TextElement {
|
|
|
|
string textElementContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Tuple {
|
|
|
|
repeated PythonTerm tupleContents = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Redirect {
|
|
|
|
PythonTerm lhs = 1;
|
|
|
|
PythonTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Assignment {
|
|
|
|
repeated PythonTerm assignmentContext = 1;
|
|
|
|
PythonTerm assignmentTarget = 2;
|
|
|
|
PythonTerm assignmentValue = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Break {
|
2018-08-08 19:39:17 +03:00
|
|
|
PythonTerm value = 1;
|
2018-07-24 00:24:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Catch {
|
|
|
|
PythonTerm catchException = 1;
|
|
|
|
PythonTerm catchBody = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Continue {
|
2018-08-08 19:39:17 +03:00
|
|
|
PythonTerm value = 1;
|
2018-07-24 00:24:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Else {
|
|
|
|
PythonTerm elseCondition = 1;
|
|
|
|
PythonTerm elseBody = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Finally {
|
2018-08-08 19:39:17 +03:00
|
|
|
PythonTerm value = 1;
|
2018-07-24 00:24:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ForEach {
|
|
|
|
PythonTerm forEachBinding = 1;
|
|
|
|
PythonTerm forEachSubject = 2;
|
|
|
|
PythonTerm forEachBody = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message If {
|
|
|
|
PythonTerm ifCondition = 1;
|
|
|
|
PythonTerm ifThenBody = 2;
|
|
|
|
PythonTerm ifElseBody = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Let {
|
|
|
|
PythonTerm letVariable = 1;
|
|
|
|
PythonTerm letValue = 2;
|
|
|
|
PythonTerm letBody = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message NoOp {
|
2018-07-24 00:35:42 +03:00
|
|
|
PythonTerm value = 1;
|
2018-07-24 00:24:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Return {
|
2018-08-08 19:39:17 +03:00
|
|
|
PythonTerm value = 1;
|
2018-07-24 00:24:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Statements {
|
|
|
|
repeated PythonTerm statements = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Throw {
|
|
|
|
PythonTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Try {
|
|
|
|
PythonTerm tryBody = 1;
|
|
|
|
repeated PythonTerm tryCatch = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message While {
|
|
|
|
PythonTerm whileCondition = 1;
|
|
|
|
PythonTerm whileBody = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Yield {
|
2018-08-08 19:39:17 +03:00
|
|
|
PythonTerm value = 1;
|
2018-07-24 00:24:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Ellipsis { }
|
|
|
|
|
|
|
|
message Import {
|
|
|
|
QualifiedName importFrom = 1;
|
|
|
|
repeated Alias importSymbols = 2;
|
|
|
|
}
|
|
|
|
|
2018-08-10 20:39:03 +03:00
|
|
|
message FutureImport {
|
|
|
|
repeated Alias futureImportSymbols = 1;
|
|
|
|
}
|
|
|
|
|
2018-07-24 00:24:36 +03:00
|
|
|
message QualifiedImport {
|
|
|
|
repeated string qualifiedImportFrom = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message QualifiedAliasedImport {
|
|
|
|
QualifiedName qualifiedAliasedImportFrom = 1;
|
|
|
|
PythonTerm qualifiedAliasedImportAlias = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Context {
|
|
|
|
repeated PythonTerm contextTerms = 1;
|
|
|
|
PythonTerm contextSubject = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Empty { }
|
|
|
|
|
|
|
|
message Error {
|
|
|
|
repeated ErrorSite errorCallStack = 1;
|
|
|
|
repeated string errorExpected = 2;
|
|
|
|
string errorActual = 3;
|
|
|
|
repeated PythonTerm errorChildren = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Identifier {
|
|
|
|
bytes name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Annotation {
|
|
|
|
PythonTerm annotationSubject = 1;
|
|
|
|
PythonTerm annotationType = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message List {
|
|
|
|
repeated PythonTerm listContent = 1;
|
|
|
|
}
|