2019-01-24 01:20:33 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2019-07-06 01:11:33 +03:00
|
|
|
package github.semantic;
|
2019-01-24 01:20:33 +03:00
|
|
|
|
2019-07-06 01:11:33 +03:00
|
|
|
option ruby_package = "Semantic::Proto";
|
2019-01-24 01:20:33 +03:00
|
|
|
|
2019-07-06 01:34:35 +03:00
|
|
|
message PingRequest {
|
|
|
|
string service = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PingResponse {
|
|
|
|
string status = 1;
|
|
|
|
string hostname = 2;
|
|
|
|
string timestamp = 3;
|
|
|
|
string sha = 4;
|
|
|
|
}
|
|
|
|
|
2019-01-24 01:20:33 +03:00
|
|
|
message ParseTreeRequest {
|
|
|
|
repeated Blob blobs = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ParseTreeSymbolResponse {
|
|
|
|
repeated File files = 1;
|
|
|
|
}
|
|
|
|
|
2020-03-06 01:00:38 +03:00
|
|
|
message StackGraphRequest {
|
|
|
|
repeated Blob blobs = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StackGraphResponse {
|
2020-03-05 00:48:32 +03:00
|
|
|
repeated StackGraphFile files = 1;
|
2020-02-13 02:14:46 +03:00
|
|
|
}
|
|
|
|
|
2019-02-05 21:05:10 +03:00
|
|
|
message ParseError {
|
2019-02-05 22:16:21 +03:00
|
|
|
string error = 1;
|
2019-01-24 03:06:29 +03:00
|
|
|
}
|
|
|
|
|
2019-01-24 01:20:33 +03:00
|
|
|
message Blob {
|
2019-01-29 01:37:50 +03:00
|
|
|
string content = 1;
|
|
|
|
string path = 2;
|
2019-03-11 23:21:27 +03:00
|
|
|
string language = 3;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message File {
|
2019-01-24 20:17:07 +03:00
|
|
|
string path = 1;
|
2019-03-11 23:21:27 +03:00
|
|
|
string language = 2;
|
2019-01-24 20:17:07 +03:00
|
|
|
repeated Symbol symbols = 3;
|
2019-02-05 22:16:21 +03:00
|
|
|
repeated ParseError errors = 4;
|
2019-04-13 01:48:49 +03:00
|
|
|
string blob_oid = 5;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Symbol {
|
2019-01-24 20:17:07 +03:00
|
|
|
string symbol = 1;
|
|
|
|
string kind = 2;
|
|
|
|
string line = 3;
|
|
|
|
Span span = 4;
|
2019-02-19 21:55:24 +03:00
|
|
|
Docstring docs = 5;
|
2020-06-02 23:52:42 +03:00
|
|
|
NodeType node_type = 6;
|
2020-06-04 19:27:14 +03:00
|
|
|
SyntaxType syntax_type = 7;
|
2020-06-26 00:37:16 +03:00
|
|
|
Span lsp_span = 8;
|
2019-02-19 21:55:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Docstring {
|
|
|
|
string docstring = 1;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Position {
|
2019-03-11 23:11:19 +03:00
|
|
|
int32 line = 1;
|
|
|
|
int32 column = 2;
|
2019-01-24 01:20:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Span {
|
|
|
|
Position start = 1;
|
|
|
|
Position end = 2;
|
|
|
|
}
|
2020-02-13 02:14:46 +03:00
|
|
|
|
2020-03-05 00:48:32 +03:00
|
|
|
message StackGraphFile {
|
2020-02-13 02:14:46 +03:00
|
|
|
string path = 1;
|
|
|
|
string language = 2;
|
2020-03-05 00:48:32 +03:00
|
|
|
repeated StackGraphNode nodes = 3;
|
|
|
|
repeated StackGraphPath paths = 4;
|
2020-02-13 02:14:46 +03:00
|
|
|
repeated ParseError errors = 5;
|
|
|
|
}
|
|
|
|
|
2020-06-02 23:52:42 +03:00
|
|
|
enum NodeType {
|
|
|
|
ROOT_SCOPE = 0;
|
|
|
|
JUMP_TO_SCOPE = 1;
|
|
|
|
EXPORTED_SCOPE = 2;
|
|
|
|
DEFINITION = 3;
|
|
|
|
REFERENCE = 4;
|
|
|
|
}
|
|
|
|
|
2020-06-04 19:27:14 +03:00
|
|
|
enum SyntaxType {
|
2020-06-05 00:03:23 +03:00
|
|
|
FUNCTION = 0;
|
|
|
|
METHOD = 1;
|
|
|
|
CLASS = 2;
|
|
|
|
MODULE = 3;
|
|
|
|
CALL = 4;
|
|
|
|
TYPE = 5;
|
|
|
|
INTERFACE = 6;
|
|
|
|
IMPLEMENTATION = 7;
|
2020-06-04 19:27:14 +03:00
|
|
|
}
|
|
|
|
|
2020-03-05 00:48:32 +03:00
|
|
|
message StackGraphNode {
|
|
|
|
int64 id = 1;
|
2020-02-13 02:14:46 +03:00
|
|
|
string name = 2;
|
|
|
|
string line = 3;
|
2020-06-04 19:27:14 +03:00
|
|
|
Span span = 4;
|
|
|
|
SyntaxType syntax_type = 5;
|
2020-03-06 00:21:06 +03:00
|
|
|
NodeType node_type = 6;
|
2020-02-13 02:14:46 +03:00
|
|
|
}
|
|
|
|
|
2020-03-05 00:48:32 +03:00
|
|
|
message StackGraphPath {
|
2020-03-05 01:33:02 +03:00
|
|
|
repeated string starting_symbol_stack = 1;
|
2020-03-05 00:48:32 +03:00
|
|
|
int64 starting_scope_stack_size = 2;
|
|
|
|
int64 from = 3;
|
2020-02-13 02:14:46 +03:00
|
|
|
string edges = 4;
|
2020-03-05 00:48:32 +03:00
|
|
|
int64 to = 5;
|
2020-03-05 22:30:40 +03:00
|
|
|
repeated int64 ending_scope_stack = 6;
|
2020-03-05 01:33:02 +03:00
|
|
|
repeated string ending_symbol_stack = 7;
|
2020-02-13 02:14:46 +03:00
|
|
|
}
|