1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00
semantic/types.proto
2018-06-01 16:33:39 -04:00

61 lines
2.0 KiB
Protocol Buffer

syntax = "proto3";
package semantic;
enum Language {Go = 0;
Haskell = 1;
JavaScript = 2;
JSON = 3;
JSX = 4;
Markdown = 5;
Python = 6;
Ruby = 7;
TypeScript = 8;
PHP = 9;}
message Blob { bytes blobSource = 1;
string blobPath = 2;
Language blobLanguage = 3;
}
message Pos { int64 posLine = 1;
int64 posColumn = 2;
}
message Span { Pos spanStart = 1;
Pos spanEnd = 2;
}
message SrcLoc { string srcLocPackage = 1;
string srcLocModule = 2;
string srcLocFile = 3;
int64 srcLocStartLine = 4;
int64 srcLocStartCol = 5;
int64 srcLocEndLine = 6;
int64 srcLocEndCol = 7;
}
message ErrorSite { bytes errorMessage = 1;
SrcLoc errorLocation = 2;
}
message Error { repeated ErrorSite errorCallStack = 1;
repeated string errorExpected = 2;
string errorActual = 3;
repeated Term errorChildren = 4;
}
message Array { repeated Term arrayElements = 1;
}
message Boolean { bool booleanContent = 1;
}
message Hash { repeated Term hashElements = 1;
}
message Float { bytes floatContent = 1;
}
message KeyValue { Term key = 1;
Term value = 2;
}
message Null {
}
message TextElement { bytes 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;}
}