Skip to content

Fix quotes with syntax properties #2

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

Merged

Conversation

MicahChalmer
Copy link
Contributor

This uses syntax properties to make it so that emacs recognizes the single quote, rather than the double quote, as the string delimiter within character literals, while leaving the syntax unchanged elsewhere.

Also included is a commit that restores ERT tests that were inadvertently broken by an earlier commit (removing trailing whitespace broke the tests--I restored them and made it so they are no longer dependent on having trailing whitespace in the code.)

Fixes #1.
Fixes #6.

Commit a8fad0f broke the ERT tests by removing trailing whitespace
inside the test strings.  Fix the tests, and replace some line endings
inside strings with explicit "\n" to avoid having further significant
trailing whitespace in the code.
This uses syntax properties to make it so that emacs recognizes the
single quote, rather than the double quote, as the string delimiter
within character literals, while leaving the syntax unchanged elsewhere.
@pnkfelix
Copy link
Member

pnkfelix commented Feb 2, 2015

Are there any tests of character literal parsing?

I would in particular like to see tests of '\'' (i.e. the single quote character); (I am inferring that is handled by this code, but I haven't read it quite carefully enough to confirm that.)

@MicahChalmer
Copy link
Contributor Author

I added a test for '\''. I also confirmed that this same change also fixes #6, and added a test for that. (I updated the pull request body to reflect that.)

@pnkfelix
Copy link
Member

pnkfelix commented Feb 6, 2015

@MicahChalmer hey thanks for following up; I took the liberty of cherry-picking the first commit in the series because that seemed important for overall workflow (at least for me). I'll be looking at the other commits shortly.

pnkfelix added a commit that referenced this pull request Feb 6, 2015
@pnkfelix pnkfelix merged commit 66438d4 into rust-lang:master Feb 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants