1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 07:25:44 +03:00
semantic/proto/python-diffs.proto
2018-07-23 17:35:42 -04:00

487 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 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;
}
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;
Redirect redirect = 49;
Assignment assignment = 50;
Break break = 51;
Catch catch = 52;
Continue continue = 53;
Else else = 54;
Finally finally = 55;
ForEach forEach = 56;
If if = 57;
Let let = 58;
NoOp noOp = 59;
Return return = 60;
Statements statements = 61;
Throw throw = 62;
Try try = 63;
While while = 64;
Yield yield = 65;
Ellipsis ellipsis = 66;
Import import = 67;
QualifiedImport qualifiedImport = 68;
QualifiedAliasedImport qualifiedAliasedImport = 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 Variable {
PythonDiff variableName = 1;
PythonDiff variableType = 2;
PythonDiff variableValue = 3;
}
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 term = 1;
}
message FloorDivision {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message And {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Not {
PythonDiff term = 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 Redirect {
PythonDiff lhs = 1;
PythonDiff rhs = 2;
}
message Assignment {
repeated PythonDiff assignmentContext = 1;
PythonDiff assignmentTarget = 2;
PythonDiff assignmentValue = 3;
}
message Break {
PythonDiff term = 1;
}
message Catch {
PythonDiff catchException = 1;
PythonDiff catchBody = 2;
}
message Continue {
PythonDiff term = 1;
}
message Else {
PythonDiff elseCondition = 1;
PythonDiff elseBody = 2;
}
message Finally {
PythonDiff term = 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 term = 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 term = 1;
}
message Ellipsis { }
message Import {
QualifiedName importFrom = 1;
repeated Alias importSymbols = 2;
}
message QualifiedImport {
repeated string qualifiedImportFrom = 1;
}
message QualifiedAliasedImport {
QualifiedName qualifiedAliasedImportFrom = 1;
PythonDiff qualifiedAliasedImportAlias = 2;
}
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;
}