1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 00:44:57 +03:00
semantic/types.proto

66 lines
2.1 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package semantic;
enum Language {Unknown = 0;
Go = 1;
Haskell = 2;
Java = 3;
JavaScript = 4;
JSON = 5;
JSX = 6;
Markdown = 7;
Python = 8;
Ruby = 9;
TypeScript = 10;
PHP = 11;}
enum VertexType {PACKAGE = 0;
MODULE = 1;
VARIABLE = 2;}
message Blob { bytes blobSource = 1;
string blobPath = 2;
Language blobLanguage = 3;
}
2018-05-31 00:42:14 +03:00
message Pos { int64 posLine = 1;
int64 posColumn = 2;
}
message Span { Pos spanStart = 1;
Pos spanEnd = 2;
}
2018-06-08 19:43:10 +03:00
message AdjList { repeated Vertex graphVertices = 1;
repeated Edge graphEdges = 2;
}
message Vertex { VertexType vertexType = 1;
string vertexContents = 2;
uint64 vertexTag = 3;
}
message Edge { uint64 edgeFrom = 1;
uint64 edgeTo = 2;
}
2018-06-08 19:51:14 +03:00
message Project { string projectRootDir = 1;
repeated Blob projectBlobs = 2;
Language projectLanguage = 3;
repeated string projectEntryPaths = 4 [packed = false];
repeated string projectExcludeDirs = 5 [packed = false];
}
message Array { repeated Term arrayElements = 1;
}
message Boolean { bool booleanContent = 1;
}
message Hash { repeated Term hashElements = 1;
}
2018-06-08 19:43:10 +03:00
message Float { string floatContent = 1;
}
message KeyValue { Term key = 1;
Term value = 2;
}
message Null {
}
2018-06-08 19:43:10 +03:00
message TextElement { string textElementContent = 1;
}
message Term { oneof syntax {Array array = 1;
Boolean boolean = 2;
Hash hash = 3;
Float float = 4;
KeyValue keyValue = 5;
Null null = 6;
TextElement textElement = 7;}
}