1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Generate errors

This commit is contained in:
joshvera 2018-06-01 16:33:27 -04:00
parent 488adf41ef
commit c6f9e4ebcb
2 changed files with 17 additions and 1 deletions

View File

@ -205,7 +205,7 @@ instance ToJSONFields1 Error where
]
instance Named String where
nameOf _ = "String"
nameOf _ = "string"
instance Message String where
encodeMessage = encodeMessageField

View File

@ -20,6 +20,22 @@ message Pos { int64 posLine = 1;
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;