Open antonmedv opened 1 month ago
If you haven't looking into go-cty, then I can 10/10 recommend it for a pseudo-type system like this - it's really flexible and powerful :)
Although cty looks interesting, I believe we better stick with native Go types. Also, I'm not sure how cty can help in case of:
func(123)
In func takes uint32 param.
We already have int() and float() builtins. Let's add others as well: uint8, byte, int64, float64, etc.
And we can change compiler to compile int for IntegerNode, and remove this code:
And for function calls we can delete this code:
And replace it with implicit added calls to int*.