Commit Graph

8 Commits

Author SHA1 Message Date
Francesc Campoy 917c72fddb Uniform licenses all around 2017-05-04 15:18:34 -04:00
Benjamin Pflanz d79b636dff Use idiomatic error messaging and variable naming, and don't make unnecessary changes. 2016-05-11 12:02:21 -04:00
Benjamin Pflanz b89a8c9df8 Correct imports and variable naming. 2016-05-03 18:50:41 -04:00
Benjamin Pflanz 7fbe89f60d Use static parsing instead of requiring a binary.
Using go/parser requires a built binary of the code to be enum'ed to
exist. This leads to two problems:
  1. The binary may be very out of date with the code, for example, when
  pulling into an existing repo that was last built locally some time
  ago, running jsonenums on newly added files will fail;
  2. If the binary has never been built, but the code already expects
  the output of jsonenums, it will be impossible to generate the enums,
  making it impossible to build the binary.

In response to a similar issue, Alan Donovan of the Go team suggested
that instead generating tools should be using (the not-yet stable)
x/tools/go/loader package to parse the actual Go code itself rather than
the compilation output: https://github.com/golang/go/issues/11415

This change uses the suggested approach to break the bootstrapping
dependency cycle.
2016-04-21 21:31:47 -04:00
pebers fb3be6d28a Need to update these paths too. 2016-04-21 09:25:22 -04:00
Daved c55a706513 Added prefix flag, and updated file name output. Changed parser
package's ParsePackage to take prefix and updated related skip
conditional.  Also updated args in call to ParsePackage within
server. Last paragraph of main package comment was updated, along
with the second to last paragraph of readme.
2015-04-23 09:50:48 -07:00
Francesc Campoy 081abb7721 added license comments 2015-02-04 13:44:42 +00:00
Francesc Campoy 40291a96dd Adding server for code generation 2015-02-04 13:30:07 +00:00