-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix non-ascii string/binary literals; Add multi-line binary literals #22
Conversation
Also: require (and ignore) one newline at the start of a string block
Hmm I think this may not be handling UTF-8 characters correctly. But possibly we already had this problem for erlang FFI snippets edit: OR they are escaped correctly but I need to pass some flags for erlang printing / writing to files. |
I think the way to go would be to pass the binary to the erlang source mostly as is from the .sest source file, so remove the For the new multiline |
It seems that this change is also causing wrong line numbers to be reported in the reported errors when e.g. a type error happens after such string block binary, this should probably be fixed before merging. edit: This was fixed. |
@gfngfn Please let me know if this would be a welcome addition and I can work on this more. |
Oops, I’m sorry for the late response. The addition you are working on is largely welcomed. Thank you! |
…g literals (pass through escape codes that Erlang uses)
@gfngfn So this is semantically more-or-less done, how I see it:
I left some TODOs to think about and tests/documentation are missing, but I would appreciate your thoughts about this design. |
…tra escape just the quote
…al problem on Windows
I think this is ready for review/merge now :) |
Thank you for looking into the implementation. I would like to review your modification. |
…ter was treated as escaped; Add more escaped (or not) characters to test
…time value; WIP escape when outputing erlang code
…g literal parsing
@gfngfn How does it look after my updates from a week ago? |
Oh, I’m so sorry for the late response and for not having given any suggestions… The updated change looks very nice to me! |
The change made by this PR looks excellent and correct according to the added tests. I would then like to merge this PR. Thank you so much for the development! |
Also: require (and ignore) one newline at the start of a string block edit: This change is to have first line aligned horizontally with other lines when you don't want a newline at the start.