compiler: fix DebugInfo JSON marshalling

MethodDebugInfo.Parameters should be marshalled as `params`
MethodDebugInfo.ReturnType --> `return`
EventDebugInfo.Parameters --> `params`

(see https://github.com/ngdseattle/design-notes/blob/master/NDX-DN11%20-%20NEO%20Debug%20Info%20Specification.md#v11-format)
This commit is contained in:
Anna Shaleva 2020-06-26 12:08:59 +03:00
parent 45213dda49
commit 66b6a27b09

View file

@ -33,7 +33,7 @@ type MethodDebugInfo struct {
// Parameters is a list of method's parameters.
Parameters []DebugParam `json:"params"`
// ReturnType is method's return type.
ReturnType string `json:"return-type"`
ReturnType string `json:"return"`
Variables []string `json:"variables"`
// SeqPoints is a map between source lines and byte-code instruction offsets.
SeqPoints []DebugSeqPoint `json:"sequence-points"`
@ -50,7 +50,7 @@ type EventDebugInfo struct {
ID string `json:"id"`
// Name is a human-readable event name in a format "{namespace}-{name}".
Name string `json:"name"`
Parameters []DebugParam `json:"parameters"`
Parameters []DebugParam `json:"params"`
}
// DebugSeqPoint represents break-point for debugger.