-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add String and String Literals #5
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should support string and string literals
Strategies
Using Arrays
One way to compile strings is to have a byte array of ascii values, where each character is represented by their numerical value (E.G.
#\D
= 100).packing by byte concatenation
Another interesting technique, if the array is inefficinet. Is to pack the string bitwise. E.G:
However it needs to be noted that we should know the field size, and make sure we don't overflow this when shifting. Thus we should have a small array of these values if we do go over size
The text was updated successfully, but these errors were encountered: