branch: elpa/julia-mode commit 1dca28b61f06a60e3909acc7bc4ff570f441f9dd Author: Jeff Bezanson <bezan...@post.harvard.edu> Commit: Yichao Yu <yyc1...@gmail.com>
adding "for i in x" syntax --- julia-mode.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/julia-mode.el b/julia-mode.el index db34000..c9910d9 100644 --- a/julia-mode.el +++ b/julia-mode.el @@ -56,6 +56,9 @@ (defconst julia-unquote-regex "\\(\\s(\\|\\s-\\|-\\|[,%=<>\\+*/?&|!\\^~\\\\;:]\\|^\\)\\($[a-zA-Z0-9_]+\\)") +(defconst julia-forloop-in-regex + "for +[^ ]+ +.*\\(in\\) +") + (defconst julia-font-lock-keywords (list '("\\<\\(\\|Uint\\(8\\|16\\|32\\|64\\)\\|Int\\(8\\|16\\|32\\|64\\)\\|Integer\\|Float\\|Float32\\|Float64\\|Complex128\\|Complex64\\|ComplexNum\\|Bool\\|Char\\|Number\\|Scalar\\|Real\\|Int\\|Uint\\|Array\\|DArray\\|AbstractArray\\|AbstractVector\\|AbstractMatrix\\|SubArray\\|StridedArray\\|StridedVector\\|StridedMatrix\\|VecOrMat\\|StridedVecOrMat\\|Range\\|Range1\\|SparseMatrixCSC\\|Tuple\\|NTuple\\|Buffer\\|Size\\|Index\\|Symbol\\|Function\\|Vector\\|Matrix\\|Union\\|Type\\|Any\ [...] font-lock-type-face) @@ -72,6 +75,7 @@ '("\\<\\(true\\|false\\|C_NULL\\)\\>" . font-lock-constant-face) (list julia-unquote-regex 2 'font-lock-constant-face) (list julia-char-regex 2 'font-lock-string-face) + (list julia-forloop-in-regex 1 'font-lock-keyword-face) ;(list julia-string-regex 0 'font-lock-string-face) ))