Skip to content
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

Handle legacy Mac OS newlines #39

Open
Krzmbrzl opened this issue May 7, 2019 · 1 comment
Open

Handle legacy Mac OS newlines #39

Krzmbrzl opened this issue May 7, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Krzmbrzl
Copy link
Contributor

Krzmbrzl commented May 7, 2019

This is a "migration" of BrettMayson/HEMTT#109

The problem is that old(er) mac versions use \r (so a single carriage return character) as the newline character. This isn't handled in the current armake-version.

@Krzmbrzl
Copy link
Contributor Author

Krzmbrzl commented May 7, 2019

When preprocessing the attached file (with old Mac newlines) this is the error message:

thread 'main' panicked at 'Failed to preprocess file: Custom { kind: Other, error: StringError("In line /home/<user>/Downloads/hemtt-example/addons/example/test.hpp:0:\n\n  a\rb\n   \u{1b}[1;31m^\u{1b}[0m\n\nUnexpected token \"\r\", expected: \"//\", \"\\\"\", \"\\\\\", \"#\", \"\\\\\\\\\", \"[ \\t]\", \"[a-zA-Z0-9_]\", \"/*\", \"(\", \"[^\\\"\\r\\n]\", \"##\", \"\\n\", \"\\r\\n\"") }', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

test.txt

@KoffeinFlummi KoffeinFlummi changed the title Old Mac-newline problems Handle legacy Mac OS newlines May 13, 2019
@KoffeinFlummi KoffeinFlummi added the enhancement New feature or request label May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants