Skip to content

Commit

Permalink
Fix --json.
Browse files Browse the repository at this point in the history
Fixes #199.
  • Loading branch information
alecthomas committed Nov 12, 2018
1 parent fb4c38e commit 022b6f4
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 89 deletions.
177 changes: 89 additions & 88 deletions tokentype_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// It is also an Emitter, emitting a single token of itself
type TokenType int

func (t *TokenType) MarshalJSON() ([]byte, error) { return json.Marshal(t.String()) }
func (t TokenType) MarshalJSON() ([]byte, error) { return json.Marshal(t.String()) }
func (t *TokenType) UnmarshalJSON(data []byte) error {
key := ""
err := json.Unmarshal(data, &key)
Expand Down

0 comments on commit 022b6f4

Please sign in to comment.