-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Rec/quoted quote #143
Rec/quoted quote #143
Changes from 6 commits
0b70bda
3deb9a3
99c86d4
06134ae
e0fc864
d9a663c
3718840
1b54729
53dc8dd
c07f511
f171927
1bf75ac
8ffbc12
03bd8ea
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 |
---|---|---|
|
@@ -482,6 +482,18 @@ identity" | |
a = \"#\" # |> | ||
identity")) | ||
|
||
(ert-deftest julia--test-indent-quoted-single-quote () | ||
"We should indent after seeing a character constant containing a single quote character." | ||
(julia--should-indent " | ||
if c in ('\'') | ||
s = \"$c$c\"*string[startpos:pos] | ||
end | ||
" " | ||
if c in ('\'') | ||
s = \"$c$c\"*string[startpos:pos] | ||
end | ||
")) | ||
|
||
;;; font-lock tests | ||
|
||
(ert-deftest julia--test-symbol-font-locking-at-bol () | ||
|
@@ -620,6 +632,10 @@ identity")) | |
(julia--should-font-lock s1 4 nil) | ||
(julia--should-font-lock s1 10 nil))) | ||
|
||
(ert-deftest julia--test-char-const-font-lock () | ||
(dolist (c '("'\\''" "'\\\"'" "'\\\\'" "'\\010'" "'\\xfe'" "'\\uabcd'" "'\\Uabcdef01'" "'\\n'" "'\\alpha'" "'a'" "'z'")) | ||
(julia--should-font-lock c 1 font-lock-string-face))) | ||
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. Need to test that the string-face ends at the end of the char literal. |
||
|
||
;;; Movement | ||
(ert-deftest julia--test-beginning-of-defun-assn-1 () | ||
"Point moves to beginning of single-line assignment function." | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,8 +110,9 @@ | |
(syntax whitespace) | ||
bol) | ||
(group "'") | ||
(or (repeat 0 8 (not (any "'"))) (not (any "\\")) | ||
"\\\\") | ||
(or (not (any "\\'")) | ||
(seq "\\" (or (repeat 1 9 (not (any "\\'"))) | ||
(any "\\'")))) | ||
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. Does this match e.g. 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. They all fit into the "(1 to 9 (not (backslash or singlequote))) after backslash" clause. I could be more prescriptive, if you like. 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. That makes sense. This is fine. If you wanted to, you could add a couple comments with more explanation of the different forms of char literals and how they're matched, but I don't think that should block merging this. 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. Yes, explanations would be great if @recri has the time. Also, indentation of |
||
(group "'")))) | ||
|
||
(defconst julia-hanging-operator-regexp | ||
|
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.
Please add
julia--should-font-lock
tests for examples from #142.