1
1
mirror of https://github.com/github/semantic.git synced 2024-11-30 14:47:30 +03:00
semantic/proto/python-diffs.proto
2018-08-14 18:16:09 -07:00

485 lines
8.2 KiB
Protocol Buffer

// This file was generated by proto-gen. Do not edit by hand.
syntax = "proto3";
package github.semantic.python_diffs;
import "types.proto";
option java_package = "com.github.semantic.python_diffs";
option go_package = "github.com/semantic/python_diffs;python";
message PythonDiff {
oneof diff {
Merge merge = 1;
Delete delete = 2;
Insert insert = 3;
Replace replace = 4;
}
message Merge {
PythonSyntax syntax = 1;
}
message Delete {
PythonSyntax before = 1;
}
message Insert {
PythonSyntax after = 1;
}
message Replace {
PythonSyntax before = 1;
PythonSyntax after = 2;
}
}
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 PythonDiff classContext = 1;
PythonDiff classIdentifier = 2;
repeated PythonDiff classSuperclasses = 3;
PythonDiff classBody = 4;
}
message Comprehension {
PythonDiff comprehensionValue = 1;
PythonDiff comprehensionBody = 2;
}
message Decorator {
PythonDiff decoratorIdentifier = 1;
repeated PythonDiff decoratorParamaters = 2;
PythonDiff decoratorBody = 3;
}
message Function {
repeated PythonDiff functionContext = 1;
PythonDiff functionName = 2;
repeated PythonDiff functionParameters = 3;
PythonDiff functionBody = 4;
}
message Plus {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Minus {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Times {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message DividedBy {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Modulo {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Power {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Negate {
PythonDiff value = 1;
}
message FloorDivision {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message And {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Not {
PythonDiff value = 1;
}
message Or {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message XOr {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message BAnd {
PythonDiff left = 1;
PythonDiff right = 2;
}
message BOr {
PythonDiff left = 1;
PythonDiff right = 2;
}
message BXOr {
PythonDiff left = 1;
PythonDiff right = 2;
}
message LShift {
PythonDiff left = 1;
PythonDiff right = 2;
}
message RShift {
PythonDiff left = 1;
PythonDiff right = 2;
}
message Complement {
PythonDiff value = 1;
}
message Call {
repeated PythonDiff callContext = 1;
PythonDiff callFunction = 2;
repeated PythonDiff callParams = 3;
PythonDiff callBlock = 4;
}
message LessThan {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message LessThanEqual {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message GreaterThan {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message GreaterThanEqual {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Equal {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message StrictEqual {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Comparison {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Enumeration {
PythonDiff enumerationStart = 1;
PythonDiff enumerationEnd = 2;
PythonDiff enumerationStep = 3;
}
message ScopeResolution {
repeated PythonDiff scopes = 1;
}
message MemberAccess {
PythonDiff lhs = 1;
bytes rhs = 2;
}
message Subscript {
PythonDiff lhs = 1;
repeated PythonDiff rhs = 2;
}
message Member {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Array {
repeated PythonDiff arrayElements = 1;
}
message Boolean {
bool booleanContent = 1;
}
message Float {
string floatContent = 1;
}
message Hash {
repeated PythonDiff hashElements = 1;
}
message Integer {
string integerContent = 1;
}
message KeyValue {
PythonDiff key = 1;
PythonDiff value = 2;
}
message Null { }
message Set {
repeated PythonDiff setElements = 1;
}
message String {
repeated PythonDiff stringElements = 1;
}
message TextElement {
string textElementContent = 1;
}
message Tuple {
repeated PythonDiff 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;
PythonDiff qualifiedAliasedImportAlias = 2;
}
message Redirect {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Assignment {
repeated PythonDiff assignmentContext = 1;
PythonDiff assignmentTarget = 2;
PythonDiff assignmentValue = 3;
}
message Break {
PythonDiff value = 1;
}
message Catch {
PythonDiff catchException = 1;
PythonDiff catchBody = 2;
}
message Continue {
PythonDiff value = 1;
}
message Else {
PythonDiff elseCondition = 1;
PythonDiff elseBody = 2;
}
message Finally {
PythonDiff value = 1;
}
message ForEach {
PythonDiff forEachBinding = 1;
PythonDiff forEachSubject = 2;
PythonDiff forEachBody = 3;
}
message If {
PythonDiff ifCondition = 1;
PythonDiff ifThenBody = 2;
PythonDiff ifElseBody = 3;
}
message Let {
PythonDiff letVariable = 1;
PythonDiff letValue = 2;
PythonDiff letBody = 3;
}
message NoOp {
PythonDiff value = 1;
}
message Return {
PythonDiff value = 1;
}
message Statements {
repeated PythonDiff statements = 1;
}
message Throw {
PythonDiff value = 1;
}
message Try {
PythonDiff tryBody = 1;
repeated PythonDiff tryCatch = 2;
}
message While {
PythonDiff whileCondition = 1;
PythonDiff whileBody = 2;
}
message Yield {
PythonDiff value = 1;
}
message Context {
repeated PythonDiff contextTerms = 1;
PythonDiff contextSubject = 2;
}
message Empty { }
message Error {
repeated ErrorSite errorCallStack = 1;
repeated string errorExpected = 2;
string errorActual = 3;
repeated PythonDiff errorChildren = 4;
}
message Identifier {
bytes name = 1;
}
message Annotation {
PythonDiff annotationSubject = 1;
PythonDiff annotationType = 2;
}
message List {
repeated PythonDiff 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;
}