Commit Graph

23 Commits

Author SHA1 Message Date
gmp 212eabc8be change ref from gitlab.wow.st to git.wow.st. 2023-10-10 10:58:34 -04:00
Greg 814c6ffa20 Add Debug variable to control verbose output. 2019-02-07 10:18:53 -05:00
Greg 20c89c6e56 Functional options to persist.Init(). 2018-08-30 09:23:21 -04:00
Greg 24d96151f4 Test changes. 2018-08-10 08:19:32 -04:00
Greg 17beaca380 Allow configuration of tidy functions. Use a closure to decide what entries
to delete. The closure takes a *bolt.Bucket and returns an integer of the
number of entries deleted.
2018-08-09 18:21:52 -04:00
Greg d6f4920507 Add DeleteSync() to generate/template.go. 2018-08-09 16:15:00 -04:00
Greg 9653dab9f4 History() now returns the correct type. Added Save(), SaveSync(), Load()
and Delete() to template.
2018-08-09 11:33:22 -04:00
Greg c52d8702b2 Do not save Var.Time to the database. 2018-08-09 09:58:40 -04:00
Greg ee4657a0ed Put the Time field into persist.Var. persist.TVar is no longer needed,
History() now returns []Var.
2018-08-09 09:29:59 -04:00
Greg 384de4d02c Simplify generate.go to only look at ast nodes Ident, TypeSwitchStmt,
and FuncDecl.
2018-08-06 13:58:12 -04:00
Greg 4c5821c7d5 Refactor pgen to use a visitor struct instead of globals. 2018-08-06 12:35:35 -04:00
Greg 2f95327892 Move code generator into its own package. 2018-08-06 12:14:16 -04:00
Greg 33821928c9 Move all file handling into main.go. 2018-08-06 12:11:15 -04:00
Greg 62c409292b Parse comments in the template and write them to the output files. 2018-08-06 11:06:33 -04:00
Greg bc06994bcf Fix import handling. Handle multiple packages per directory and save
each output package to a different file.
2018-08-06 11:04:25 -04:00
Greg 3329fe75df Refactor gen.go into Generator type. 2018-08-06 10:01:40 -04:00
Greg 1c3bab0dcc Simplified type handling. 2018-08-04 16:39:39 -04:00
Greg ee4f005b6c Allow users to pass options to persist.New(). Support for bools. 2018-08-04 16:03:00 -04:00
Greg 100f65f83a pgen: discover types for composite literals. 2018-08-04 15:41:34 -04:00
Greg 0d662564aa Bug fix in gen.go: do not try to write if there is no output. 2018-08-03 16:39:01 -04:00
Greg 56ab75dcc2 Changes to test/basic. Confirm that named imports work. 2018-08-03 15:17:04 -04:00
Greg 8f78a6c6d2 Register types with encoding/gob. Rewrite test/basic. 2018-08-03 15:14:10 -04:00
Greg b880a5671d Initial commit. 2018-08-03 15:08:30 -04:00