mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
467 lines
7.9 KiB
Protocol Buffer
467 lines
7.9 KiB
Protocol Buffer
// This file was generated by proto-gen. Do not edit by hand.
|
|
syntax = "proto3";
|
|
|
|
package github.semantic.pythonterm;
|
|
|
|
import "types.proto";
|
|
|
|
option java_package = "com.github.semantic.pythonterm";
|
|
option go_package = "github.com/semantic/pythonterm;python";
|
|
|
|
message PythonTerm {
|
|
PythonSyntax syntax = 1;
|
|
}
|
|
|
|
message PythonSyntax {
|
|
oneof syntax {
|
|
Comment comment = 1;
|
|
Class class = 2;
|
|
Comprehension comprehension = 3;
|
|
Decorator decorator = 4;
|
|
Function function = 5;
|
|
Plus plus = 6;
|
|
Minus minus = 7;
|
|
Times times = 8;
|
|
DividedBy dividedBy = 9;
|
|
Modulo modulo = 10;
|
|
Power power = 11;
|
|
Negate negate = 12;
|
|
FloorDivision floorDivision = 13;
|
|
And and = 14;
|
|
Not not = 15;
|
|
Or or = 16;
|
|
XOr xOr = 17;
|
|
BAnd bAnd = 18;
|
|
BOr bOr = 19;
|
|
BXOr bXOr = 20;
|
|
LShift lShift = 21;
|
|
RShift rShift = 22;
|
|
Complement complement = 23;
|
|
Call call = 24;
|
|
LessThan lessThan = 25;
|
|
LessThanEqual lessThanEqual = 26;
|
|
GreaterThan greaterThan = 27;
|
|
GreaterThanEqual greaterThanEqual = 28;
|
|
Equal equal = 29;
|
|
StrictEqual strictEqual = 30;
|
|
Comparison comparison = 31;
|
|
Enumeration enumeration = 32;
|
|
ScopeResolution scopeResolution = 33;
|
|
MemberAccess memberAccess = 34;
|
|
Subscript subscript = 35;
|
|
Member member = 36;
|
|
Array array = 37;
|
|
Boolean boolean = 38;
|
|
Float float = 39;
|
|
Hash hash = 40;
|
|
Integer integer = 41;
|
|
KeyValue keyValue = 42;
|
|
Null null = 43;
|
|
Set set = 44;
|
|
String string = 45;
|
|
TextElement textElement = 46;
|
|
Tuple tuple = 47;
|
|
Ellipsis ellipsis = 48;
|
|
FutureImport futureImport = 49;
|
|
Import import = 50;
|
|
QualifiedImport qualifiedImport = 51;
|
|
QualifiedAliasedImport qualifiedAliasedImport = 52;
|
|
Redirect redirect = 53;
|
|
Assignment assignment = 54;
|
|
Break break = 55;
|
|
Catch catch = 56;
|
|
Continue continue = 57;
|
|
Else else = 58;
|
|
Finally finally = 59;
|
|
ForEach forEach = 60;
|
|
If if = 61;
|
|
Let let = 62;
|
|
NoOp noOp = 63;
|
|
Return return = 64;
|
|
Statements statements = 65;
|
|
Throw throw = 66;
|
|
Try try = 67;
|
|
While while = 68;
|
|
Yield yield = 69;
|
|
Context context = 70;
|
|
Empty empty = 71;
|
|
Error error = 72;
|
|
Identifier identifier = 73;
|
|
Annotation annotation = 74;
|
|
List list = 75;
|
|
}
|
|
}
|
|
|
|
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 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 {
|
|
PythonTerm value = 1;
|
|
}
|
|
|
|
message FloorDivision {
|
|
PythonTerm lhs = 1;
|
|
PythonTerm rhs = 2;
|
|
}
|
|
|
|
message And {
|
|
PythonTerm lhs = 1;
|
|
PythonTerm rhs = 2;
|
|
}
|
|
|
|
message Not {
|
|
PythonTerm value = 1;
|
|
}
|
|
|
|
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 Ellipsis { }
|
|
|
|
message FutureImport {
|
|
repeated Alias futureImportSymbols = 1;
|
|
}
|
|
|
|
message Import {
|
|
QualifiedName importFrom = 1;
|
|
repeated Alias importSymbols = 2;
|
|
}
|
|
|
|
message QualifiedImport {
|
|
repeated string qualifiedImportFrom = 1;
|
|
}
|
|
|
|
message QualifiedAliasedImport {
|
|
QualifiedName qualifiedAliasedImportFrom = 1;
|
|
PythonTerm qualifiedAliasedImportAlias = 2;
|
|
}
|
|
|
|
message Redirect {
|
|
PythonTerm lhs = 1;
|
|
PythonTerm rhs = 2;
|
|
}
|
|
|
|
message Assignment {
|
|
repeated PythonTerm assignmentContext = 1;
|
|
PythonTerm assignmentTarget = 2;
|
|
PythonTerm assignmentValue = 3;
|
|
}
|
|
|
|
message Break {
|
|
PythonTerm value = 1;
|
|
}
|
|
|
|
message Catch {
|
|
PythonTerm catchException = 1;
|
|
PythonTerm catchBody = 2;
|
|
}
|
|
|
|
message Continue {
|
|
PythonTerm value = 1;
|
|
}
|
|
|
|
message Else {
|
|
PythonTerm elseCondition = 1;
|
|
PythonTerm elseBody = 2;
|
|
}
|
|
|
|
message Finally {
|
|
PythonTerm value = 1;
|
|
}
|
|
|
|
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 {
|
|
PythonTerm value = 1;
|
|
}
|
|
|
|
message Return {
|
|
PythonTerm value = 1;
|
|
}
|
|
|
|
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 {
|
|
PythonTerm value = 1;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
message QualifiedName {
|
|
oneof sum {
|
|
QualifiedName qualifiedName = 1;
|
|
RelativeQualifiedName relativeQualifiedName = 2;
|
|
}
|
|
message QualifiedName {
|
|
repeated string paths = 1;
|
|
}
|
|
message RelativeQualifiedName {
|
|
string path = 1;
|
|
QualifiedName maybeQualifiedName = 2;
|
|
}
|
|
}
|
|
|
|
message Alias {
|
|
bytes aliasValue = 1;
|
|
bytes aliasName = 2;
|
|
}
|