branch: elpa/julia-mode
commit fabafadaa5af2861909393e4091b712f335043b9
Author: Rafael Fourquet <[email protected]>
Commit: Yichao Yu <[email protected]>
julia-mode.el: improve matching of function assignment syntax
The case when a module qualification is prepended to the function name
is handled like in normal function syntax, and support for one level of
nested parentheses is added, e.g. M.f(x::(Int,)) = 1 (tuple types) or
M.f(x, y=length(x)).
---
julia-mode.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/julia-mode.el b/julia-mode.el
index 9cd4ae5..0ce07b4 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -148,11 +148,15 @@ This function provides equivalent functionality, but
makes no efforts to optimis
(defconst julia-function-assignment-regex
(rx line-start symbol-start
+ (* (seq (1+ (or word (syntax symbol))) ".")) ; module name
(group (1+ (or word (syntax symbol))))
(* space)
(? "{" (* (not (any "}"))) "}")
(* space)
- "(" (* (not (any ")"))) ")"
+ "(" (* (or
+ (seq "(" (* (not (any "(" ")"))) ")")
+ (not (any "(" ")"))))
+ ")"
(* space)
"="))