crashappsec / libcon4m

Base Compiler and Runtime Support for con4m
Apache License 2.0
0 stars 0 forks source link

Switch statement code generation #82

Closed viega closed 1 week ago

viega commented 1 week ago

Code generation is done for switch statements, including multiple conditions in a case, and ranges in a case.

I also changed the default semantics around print() to wrap strings to the terminal width by default, but to truncate grids to the width. As part of that, I did fix format() to not write nulls in a string; we were ignoring them, but when debugging trying to look at the raw c string wasn't always fun.

Some more test cases added; as part of doing them, I realized I had forgotten to do unsigned comparison operators, so fixed that as well.