emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/julia-mode ac55340 175/352: Factoring out a types regex.


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode ac55340 175/352: Factoring out a types regex.
Date: Sun, 29 Aug 2021 11:22:39 -0400 (EDT)

branch: elpa/julia-mode
commit ac553405e3c6c7b4b19678a2be2249a56b3d7843
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Yichao Yu <yyc1992@gmail.com>

    Factoring out a types regex.
---
 julia-mode.el | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/julia-mode.el b/julia-mode.el
index c4e3522..a41aba7 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -154,10 +154,24 @@
    '()
    'symbols))
 
+(defconst julia-builtin-types-regex
+  (regexp-opt
+   '("Number" "Real" "BigInt" "Integer"
+     "Uint" "Uint8" "Uint16" "Uint32" "Uint64" "Uint128"
+     "Int" "Int8" "Int16" "Int32" "Int64" "Int128"
+     "BigFloat" "FloatingPoint" "Float16" "Float32" "Float64"
+     "Complex128" "Complex64" "ComplexPair"
+     "Bool"
+     "Char" "ASCIIString" "UTF8String" "ByteString" "SubString"
+     "Array" "DArray" "AbstractArray" "AbstractVector" "AbstractMatrix" 
"AbstractSparseMatrix" "SubArray" "StridedArray" "StridedVector" 
"StridedMatrix" "VecOrMat" "StridedVecOrMat" "DenseArray" "SparseMatrixCSC"
+     "Range" "Range1" "OrdinalRange" "StepRange" "UnitRange" "FloatRange"
+     "Tuple" "NTuple"
+     "DataType" "Symbol" "Function" "Vector" "Matrix" "Union" "Type" "Any" 
"Complex" "None" "String" "Ptr" "Void" "Exception" "Task" "Signed" "Unsigned" 
"Associative" "Dict" "IO" "IOStream" "Ranges" "Rational" "Regex" "RegexMatch" 
"Set" "IntSet" "Expr" "WeakRef" "Nothing" "ObjectIdDict")
+   'symbols))
+
 (defconst julia-font-lock-keywords
   (list
-   
'("\\<\\(\\|Uint\\(8\\|16\\|32\\|64\\|128\\)\\|Int\\(8\\|16\\|32\\|64\\|128\\)\\|BigInt\\|Integer\\|BigFloat\\|FloatingPoint\\|Float16\\|Float32\\|Float64\\|Complex128\\|Complex64\\|ComplexPair\\|Bool\\|Char\\|DataType\\|Number\\|Real\\|Int\\|Uint\\|Array\\|DArray\\|AbstractArray\\|AbstractVector\\|AbstractMatrix\\|AbstractSparseMatrix\\|SubArray\\|StridedArray\\|StridedVector\\|StridedMatrix\\|VecOrMat\\|StridedVecOrMat\\|DenseArray\\|Range\\|OrdinalRange\\|StepRange\\|UnitRange\\|Fl
 [...]
-     font-lock-type-face)
+    (cons julia-builtin-types-regex 'font-lock-type-face)
     (cons julia-keyword-regex 'font-lock-keyword-face)
     (cons julia-macro-regex 'font-lock-keyword-face)
     (cons



reply via email to

[Prev in Thread] Current Thread [Next in Thread]