zig icon indicating copy to clipboard operation
zig copied to clipboard

type.Type.eql: remove mod parameter

Open wooster0 opened this issue 1 year ago • 2 comments

I was gonna do more than this (namely remove Type.Payload) but that quickly turned out to be a bit too much to do all at once. It's going to need a lot of regex and patience.

Though in the future if anyone wants to take that on, this regex and this replace command might be helpful:

try .*.ptr\(.*, (.*), .{\n|.*pointee_type = (.*),|@"addrspace" = (.*),|mutable = (.*),|@"align" = (.*)|sentinel = (.*),|@"allowzero" = (.*),|@"volatile" = (.*),|size = (.*),|host_size = (.*),|bit_offset = (.*),|vector_index = (.*),
find src -type f -exec sed -E -i 's/([a-zA-Z_]*ty.*)\.ptrInfo\(([^)]*)\)/Type.ptrInfoIp\(ip, \1.toIntern()\)/' {} \;

It would need a ton more than this though. But if you're interested, basically go to https://regex101.com/ and then paste a bunch of samples you grepped and develop your regex.

wooster0 avatar Jun 15 '23 00:06 wooster0

namely remove Type.Payload

Note that I already did this in a local commit.

jacobly0 avatar Jun 15 '23 23:06 jacobly0

Great!

wooster0 avatar Jun 16 '23 02:06 wooster0