Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 2.5 KB

todo.org

File metadata and controls

60 lines (44 loc) · 2.5 KB

pstruct todos

string with a better syntax? need to specify the length type, consider specifying a fixed size too? (i dont think it is possible right now)

use anyhow but still pretty print pest errors

allow specifying user types with nothing

what did i mean by this? i forgot oops

probably external user types

Allow setting array max size // bounded unknown arrays

define syntax; probably an option?

something similar to the cstring stuff but for more general data types; is it useful?

Add enums

#define support for constants or similar

maybe some sort of metadata per struct as well?

or possibly both?

Template tests? Can I do that in a non-shit way?

Some kind of full test where it runs through go test

for this, we need to generate some test code either do something nuts using reflection and go to have a single test file for all possible structs or just generate a basic thing making random assignments, encoding and decoding and seeing if it matches

two dirs, pass and fail

files in pass need to generate an output and go build should work on them files in fail will fail (duh) run ../pstruct{} EXE_SUFFIX with the specified files every run, make new directory, output into it, nuke it afterwards if we do the above, run go test as well

test mod structure

something to run a full ‘step’ easily, whether it fails or not

two folders in the test dir -> how to reference it? do i just include_bytes! the files into the tests?

maybe a simple macro that generates a test function for each file found, that’d be cool

not sure if i could do something like rgtest! but that runs by looking at all files in a dir, maybe if that was done at compile time?

actually maybe i dont need that, but tbh i probably do i could, but then i’d need to make my own proc macro apparently? makes sense i guess? doesn’t look too bad, i should do it could also just use test-generator lol making a proc macro using glob seems fun tho

Dummy values (not stored in struct)

Magic values -> kinda like dummy values, but have a constraint associated

Remove encode/decode from the Go interface and put it in the runtime taking an interface Struct as parameter

Make string invalid, []string and [x]string only for cstring consistency

existing string would become []string should just remove string altogether likely, it’s weird right now

Handle `array_size_type` with cstrings

requires go runtime change

Error message when defining reserved identifiers

Need to figure out what those are first