-
Couldn't load subscription status.
- Fork 14
Loop reduction over the first 2 elements of the stack #12
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -114,15 +114,13 @@ | |
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\c" 30)))) | ||
| | ||
| (with-temp-buffer | ||
| (insert "\\newline\\return\\space\\tab\\a\\b\\c") | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you mean to add an extra test case instead of replacing this one? I think it'd be good if we still tested for these special cases like \newline and \return... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's just that this test is repeated already: https://github.com/lambdaisland/parseclj/blob/master/test/parseclj-lex-test.el#L105, I separated this change into its own commit so it'd be easier to spot. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got it, thanks! | ||
| (insert "\\u \\v \\w") | ||
| (goto-char 1) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\newline" 1))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\return" 9))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\space" 16))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\tab" 22))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\a" 26))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\b" 28))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\c" 30)))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\u" 1))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :whitespace " " 3))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\v" 4))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :whitespace " " 6))) | ||
| (should (equal (parseclj-lex-next) (parseclj-lex-token :character "\\w" 7)))) | ||
| | ||
| (with-temp-buffer | ||
| (insert "\\u0078\\o170") | ||
| | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to leave these in the
let, that would also make it a bit easier to review. Right now it's hard to see what exactly changed here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I screwed up while reworking the code.