2018-09-08 01:12:47 +03:00
|
|
|
// This file was generated by proto-gen. Do not edit by hand.
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package github.semantic.goterm;
|
|
|
|
|
|
|
|
import "types.proto";
|
|
|
|
|
|
|
|
option java_package = "com.github.semantic.goterm";
|
|
|
|
option go_package = "github.com/semantic/goterm;go";
|
|
|
|
|
|
|
|
message GoTerm {
|
|
|
|
GoSyntax syntax = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GoSyntax {
|
|
|
|
oneof syntax {
|
|
|
|
Comment comment = 1;
|
|
|
|
Constructor constructor = 2;
|
|
|
|
Function function = 3;
|
|
|
|
Method method = 4;
|
|
|
|
MethodSignature methodSignature = 5;
|
|
|
|
Type type = 6;
|
|
|
|
TypeAlias typeAlias = 7;
|
|
|
|
Plus plus = 8;
|
|
|
|
Minus minus = 9;
|
|
|
|
Times times = 10;
|
|
|
|
DividedBy dividedBy = 11;
|
|
|
|
Modulo modulo = 12;
|
|
|
|
Power power = 13;
|
|
|
|
Negate negate = 14;
|
|
|
|
FloorDivision floorDivision = 15;
|
|
|
|
BOr bOr = 16;
|
|
|
|
BAnd bAnd = 17;
|
|
|
|
BXOr bXOr = 18;
|
|
|
|
LShift lShift = 19;
|
|
|
|
RShift rShift = 20;
|
|
|
|
UnsignedRShift unsignedRShift = 21;
|
|
|
|
Complement complement = 22;
|
|
|
|
Call call = 23;
|
|
|
|
LessThan lessThan = 24;
|
|
|
|
LessThanEqual lessThanEqual = 25;
|
|
|
|
GreaterThan greaterThan = 26;
|
|
|
|
GreaterThanEqual greaterThanEqual = 27;
|
|
|
|
Equal equal = 28;
|
|
|
|
StrictEqual strictEqual = 29;
|
|
|
|
Comparison comparison = 30;
|
|
|
|
Subscript subscript = 31;
|
|
|
|
Member member = 32;
|
|
|
|
PostDecrement postDecrement = 33;
|
|
|
|
PostIncrement postIncrement = 34;
|
|
|
|
MemberAccess memberAccess = 35;
|
|
|
|
And and = 36;
|
|
|
|
Not not = 37;
|
|
|
|
Or or = 38;
|
|
|
|
XOr xOr = 39;
|
|
|
|
Composite composite = 40;
|
|
|
|
DefaultPattern defaultPattern = 41;
|
|
|
|
Defer defer = 42;
|
|
|
|
Field field = 43;
|
|
|
|
Go go = 44;
|
|
|
|
Label label = 45;
|
|
|
|
Package package = 46;
|
|
|
|
Receive receive = 47;
|
|
|
|
ReceiveOperator receiveOperator = 48;
|
|
|
|
Rune rune = 49;
|
|
|
|
Select select = 50;
|
|
|
|
Send send = 51;
|
|
|
|
Slice slice = 52;
|
|
|
|
TypeAssertion typeAssertion = 53;
|
|
|
|
TypeConversion typeConversion = 54;
|
|
|
|
TypeSwitch typeSwitch = 55;
|
|
|
|
TypeSwitchGuard typeSwitchGuard = 56;
|
|
|
|
Variadic variadic = 57;
|
|
|
|
BidirectionalChannel bidirectionalChannel = 58;
|
|
|
|
ReceiveChannel receiveChannel = 59;
|
|
|
|
SendChannel sendChannel = 60;
|
|
|
|
Import import = 61;
|
|
|
|
QualifiedImport qualifiedImport = 62;
|
|
|
|
SideEffectImport sideEffectImport = 63;
|
|
|
|
Array array = 64;
|
|
|
|
Complex complex = 65;
|
|
|
|
Float float = 66;
|
|
|
|
Hash hash = 67;
|
|
|
|
Integer integer = 68;
|
|
|
|
KeyValue keyValue = 69;
|
|
|
|
Pointer pointer = 70;
|
|
|
|
Reference reference = 71;
|
|
|
|
TextElement textElement = 72;
|
|
|
|
Assignment assignment = 73;
|
|
|
|
Break break = 74;
|
|
|
|
Continue continue = 75;
|
|
|
|
For for = 76;
|
|
|
|
ForEach forEach = 77;
|
|
|
|
Goto goto = 78;
|
|
|
|
If if = 79;
|
|
|
|
Match match = 80;
|
|
|
|
NoOp noOp = 81;
|
|
|
|
Pattern pattern = 82;
|
|
|
|
Return return = 83;
|
|
|
|
Statements statements = 84;
|
|
|
|
Context context = 85;
|
|
|
|
Error error = 86;
|
|
|
|
Empty empty = 87;
|
|
|
|
Identifier identifier = 88;
|
|
|
|
Annotation annotation = 89;
|
|
|
|
TypeArray typeArray = 90;
|
|
|
|
TypeFunction typeFunction = 91;
|
|
|
|
Interface interface = 92;
|
|
|
|
Map map = 93;
|
|
|
|
Parenthesized parenthesized = 94;
|
|
|
|
TypePointer typePointer = 95;
|
|
|
|
TypeSlice typeSlice = 96;
|
|
|
|
List list = 97;
|
|
|
|
String string = 98;
|
|
|
|
EscapeSequence escapeSequence = 99;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message Comment {
|
|
|
|
string commentContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Constructor {
|
|
|
|
repeated GoTerm constructorContext = 1;
|
|
|
|
GoTerm constructorName = 2;
|
|
|
|
GoTerm constructorFields = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Function {
|
|
|
|
repeated GoTerm functionContext = 1;
|
|
|
|
GoTerm functionName = 2;
|
|
|
|
repeated GoTerm functionParameters = 3;
|
|
|
|
GoTerm functionBody = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Method {
|
|
|
|
repeated GoTerm methodContext = 1;
|
|
|
|
GoTerm methodReceiver = 2;
|
|
|
|
GoTerm methodName = 3;
|
|
|
|
repeated GoTerm methodParameters = 4;
|
|
|
|
GoTerm methodBody = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MethodSignature {
|
|
|
|
repeated GoTerm methodSignatureContext = 1;
|
|
|
|
GoTerm methodSignatureName = 2;
|
|
|
|
repeated GoTerm methodSignatureParameters = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Type {
|
|
|
|
GoTerm typeName = 1;
|
|
|
|
GoTerm typeKind = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TypeAlias {
|
|
|
|
repeated GoTerm typeAliasContext = 1;
|
|
|
|
GoTerm typeAliasIdentifier = 2;
|
|
|
|
GoTerm typeAliasKind = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Plus {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Minus {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Times {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DividedBy {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Modulo {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Power {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Negate {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message FloorDivision {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BOr {
|
2018-12-11 00:42:33 +03:00
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
2018-09-08 01:12:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message BAnd {
|
2018-12-11 00:42:33 +03:00
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
2018-09-08 01:12:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message BXOr {
|
2018-12-11 00:42:33 +03:00
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
2018-09-08 01:12:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message LShift {
|
2018-12-11 00:42:33 +03:00
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
2018-09-08 01:12:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message RShift {
|
2018-12-11 00:42:33 +03:00
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
2018-09-08 01:12:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message UnsignedRShift {
|
2018-12-11 00:42:33 +03:00
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
2018-09-08 01:12:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Complement {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Call {
|
|
|
|
repeated GoTerm callContext = 1;
|
|
|
|
GoTerm callFunction = 2;
|
|
|
|
repeated GoTerm callParams = 3;
|
|
|
|
GoTerm callBlock = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LessThan {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LessThanEqual {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GreaterThan {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GreaterThanEqual {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Equal {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StrictEqual {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Comparison {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Subscript {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
repeated GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Member {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PostDecrement {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PostIncrement {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MemberAccess {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
bytes rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message And {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Not {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Or {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message XOr {
|
|
|
|
GoTerm lhs = 1;
|
|
|
|
GoTerm rhs = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Composite {
|
|
|
|
GoTerm compositeType = 1;
|
|
|
|
GoTerm compositeElement = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DefaultPattern {
|
|
|
|
GoTerm defaultPatternBody = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Defer {
|
|
|
|
GoTerm deferBody = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Field {
|
|
|
|
repeated GoTerm fieldContext = 1;
|
|
|
|
GoTerm fieldName = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Go {
|
|
|
|
GoTerm goBody = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Label {
|
|
|
|
GoTerm labelName = 1;
|
|
|
|
GoTerm labelStatement = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Package {
|
|
|
|
GoTerm packageName = 1;
|
|
|
|
repeated GoTerm packageContents = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Receive {
|
|
|
|
GoTerm receiveSubject = 1;
|
|
|
|
GoTerm receiveExpression = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReceiveOperator {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Rune {
|
|
|
|
string runeLiteral = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Select {
|
|
|
|
GoTerm selectCases = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Send {
|
|
|
|
GoTerm sendReceiver = 1;
|
|
|
|
GoTerm sendValue = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Slice {
|
|
|
|
GoTerm sliceName = 1;
|
|
|
|
GoTerm sliceLow = 2;
|
|
|
|
GoTerm sliceHigh = 3;
|
|
|
|
GoTerm sliceCapacity = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TypeAssertion {
|
|
|
|
GoTerm typeAssertionSubject = 1;
|
|
|
|
GoTerm typeAssertionType = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TypeConversion {
|
|
|
|
GoTerm typeConversionType = 1;
|
|
|
|
GoTerm typeConversionSubject = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TypeSwitch {
|
|
|
|
GoTerm typeSwitchSubject = 1;
|
|
|
|
GoTerm typeSwitchCases = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TypeSwitchGuard {
|
|
|
|
GoTerm typeSwitchGuardSubject = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Variadic {
|
|
|
|
repeated GoTerm variadicContext = 1;
|
|
|
|
GoTerm variadicIdentifier = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BidirectionalChannel {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReceiveChannel {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SendChannel {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Import {
|
|
|
|
ImportPath importFrom = 1;
|
|
|
|
GoTerm importWildcardToken = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message QualifiedImport {
|
|
|
|
ImportPath qualifiedImportFrom = 1;
|
|
|
|
GoTerm qualifiedImportAlias = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SideEffectImport {
|
|
|
|
ImportPath sideEffectImportFrom = 1;
|
|
|
|
GoTerm sideEffectImportToken = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Array {
|
|
|
|
repeated GoTerm arrayElements = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Complex {
|
|
|
|
string value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Float {
|
|
|
|
string floatContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Hash {
|
|
|
|
repeated GoTerm hashElements = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Integer {
|
|
|
|
string integerContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message KeyValue {
|
|
|
|
GoTerm key = 1;
|
|
|
|
GoTerm value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Pointer {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Reference {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TextElement {
|
|
|
|
string textElementContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Assignment {
|
|
|
|
repeated GoTerm assignmentContext = 1;
|
|
|
|
GoTerm assignmentTarget = 2;
|
|
|
|
GoTerm assignmentValue = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Break {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Continue {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message For {
|
|
|
|
GoTerm forBefore = 1;
|
|
|
|
GoTerm forCondition = 2;
|
|
|
|
GoTerm forStep = 3;
|
|
|
|
GoTerm forBody = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ForEach {
|
|
|
|
GoTerm forEachBinding = 1;
|
|
|
|
GoTerm forEachSubject = 2;
|
|
|
|
GoTerm forEachBody = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Goto {
|
|
|
|
GoTerm gotoLocation = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message If {
|
|
|
|
GoTerm ifCondition = 1;
|
|
|
|
GoTerm ifThenBody = 2;
|
|
|
|
GoTerm ifElseBody = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Match {
|
|
|
|
GoTerm matchSubject = 1;
|
|
|
|
GoTerm matchPatterns = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message NoOp {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Pattern {
|
|
|
|
GoTerm value = 1;
|
|
|
|
GoTerm patternBody = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Return {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Statements {
|
|
|
|
repeated GoTerm statements = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Context {
|
|
|
|
repeated GoTerm contextTerms = 1;
|
|
|
|
GoTerm contextSubject = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Error {
|
|
|
|
repeated ErrorSite errorCallStack = 1;
|
|
|
|
repeated string errorExpected = 2;
|
|
|
|
string errorActual = 3;
|
|
|
|
repeated GoTerm errorChildren = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Empty { }
|
|
|
|
|
|
|
|
message Identifier {
|
|
|
|
bytes name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Annotation {
|
|
|
|
GoTerm annotationSubject = 1;
|
|
|
|
GoTerm annotationType = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TypeArray {
|
|
|
|
repeated GoTerm arraySize = 1;
|
|
|
|
GoTerm arrayElementType = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TypeFunction {
|
|
|
|
repeated GoTerm functionParameters = 1;
|
|
|
|
GoTerm functionReturn = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Interface {
|
|
|
|
repeated GoTerm values = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Map {
|
|
|
|
GoTerm mapKeyType = 1;
|
|
|
|
GoTerm mapElementType = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Parenthesized {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TypePointer {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TypeSlice {
|
|
|
|
GoTerm value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message List {
|
|
|
|
repeated GoTerm listContent = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message String {
|
|
|
|
repeated GoTerm stringElements = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message EscapeSequence {
|
|
|
|
string value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ImportPath {
|
|
|
|
string unPath = 1;
|
|
|
|
IsRelative pathIsRelative = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum IsRelative {
|
|
|
|
Unknown = 0;
|
|
|
|
Relative = 1;
|
|
|
|
NonRelative = 2;
|
|
|
|
}
|