Closed QuinnWilton closed 4 years ago
Thank you! :heart:
Edit: I actually just went and made this change, and it seems like the tests do in fact fail, so the code is needed. Sorry for the false alarm :) I hadn't yet gone through the encoding logic, and didn't realize Codegen.jump_table/2
was called directly.
Thank you for the quick merge! While tracing through the code last night, I noticed a few other bits of code that don't seem to be used, but I was hesitant to delete them in case you weren't interested in that kind of cleanup PR.
For example, as far as I can tell, this clause is never hit, since ranges are only defined using charlists: https://github.com/michalmuskala/jason/blob/master/lib/codegen.ex#L96
Would it be helpful if I also got rid of code like that too?
I believe it's used in here - it generates a list of single-integer elements
But yeah, if there's any unused code, it should definitely go.
Yup, you're right. I missed the direct calls to Codegen.jump_table/2
. Will do, thanks for getting back to me!
While reading through the code I noticed that this macro was unused.