diff --git a/gigaparsec.go b/gigaparsec.go index d89cf07..e8061c8 100644 --- a/gigaparsec.go +++ b/gigaparsec.go @@ -11,16 +11,16 @@ import ( type Result[In, Out any] struct { consumed, failed bool - Value Out + value Out next State[In] - Message Message + message Message } func Fail[In, Out any](consumed bool, msg Message) Result[In, Out] { return Result[In, Out]{ consumed: consumed, failed: true, - Message: msg, + message: msg, } } @@ -28,7 +28,7 @@ func (r Result[In, Out]) Failed() (ok, consumed bool, msg Message) { ok = r.failed if ok { consumed = r.consumed - msg = r.Message + msg = r.message } return } @@ -36,10 +36,10 @@ func (r Result[In, Out]) Failed() (ok, consumed bool, msg Message) { func Succeed[In, Out any](consumed bool, value Out, next State[In], msg Message) Result[In, Out] { return Result[In, Out]{ failed: false, - Value: value, + value: value, consumed: consumed, next: next, - Message: msg, + message: msg, } } @@ -47,9 +47,9 @@ func (r Result[In, Out]) Succeeded() (ok, consumed bool, value Out, next State[I ok = !r.failed if ok { consumed = r.consumed - value = r.Value + value = r.value next = r.next - msg = r.Message + msg = r.message } return }