annotate runtime/syntax/julia.vim @ 33529:6d7a054bf2e3 v9.0.2013

patch 9.0.2013: Unicode tables outdated Commit: https://github.com/vim/vim/commit/a634b92b969e1bcb47551a39bf4e11e41ba9aa17 Author: Christian Brabandt <cb@256bit.org> Date: Wed Oct 11 21:24:49 2023 +0200 patch 9.0.2013: Unicode tables outdated Problem: Unicode tables outdated Solution: Update Unicode tables to v15.1 (released 23.09.2023) closes: #13311 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 11 Oct 2023 21:30:09 +0200
parents 29ec2c198c8d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25619
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: julia
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Carlo Baldassi <carlobaldassi@gmail.com>
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Homepage: https://github.com/JuliaEditorSupport/julia-vim
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Last Change: 2021 Aug 04
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if version < 600
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 syntax clear
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 elseif exists("b:current_syntax")
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 finish
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 endif
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 let s:cpo_save = &cpo
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 set cpo&vim
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 if version < 704
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 " this is used to disable regex syntax like `\@3<='
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 " on older vim versions
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 function! s:d(x)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 return ''
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 endfunction
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 else
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 function! s:d(x)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 return string(a:x)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 endfunction
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 endif
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 scriptencoding utf-8
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 let s:julia_spellcheck_strings = get(g:, "julia_spellcheck_strings", 0)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 let s:julia_spellcheck_docstrings = get(g:, "julia_spellcheck_docstrings", 1)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 let s:julia_spellcheck_comments = get(g:, "julia_spellcheck_comments", 1)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 let s:julia_highlight_operators = get(g:, "julia_highlight_operators", 1)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 " List of characters, up to \UFF, which cannot be used in identifiers.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 " (It includes operator characters; we don't consider them identifiers.)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 " This is used mostly in lookbehinds with `\@<=`, e.g. when we need to check
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 " that that we're not in the middle of an identifier.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 " It doesn't include a few characters (spaces and all closing parentheses)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 " because those may or may not be valid in the lookbehind on a case-by-case
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 " basis.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 let s:nonid_chars = '\U00-\U08' . '\U0A-\U1F'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 \ . '\U21-\U28' . '\U2A-\U2F' . '\U3A-\U40' . '\U5B-\U5E' . '\U60' . '\U7B\U7C'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 \ . '\U7E-\UA1' . '\UA7\UA8' . '\UAB-\UAD' . '\UAF\UB1\UB4' . '\UB6-\UB8' . '\UBB\UBF' . '\UD7\UF7'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 " The complete list
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 let s:nonidS_chars = '[:space:])\U5D}' . s:nonid_chars
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 " List of all valid operator chars up to \UFF (NOTE: they must all be included
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 " in s:nonidS_chars, so that if we include that, then this is redundant)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 " It does not include '!' since it can be used in an identifier.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 " The list contains the following characters: '%&*+-/<=>\\^|~¬±×÷'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 let s:op_chars = '\U25\U26\U2A\U2B\U2D\U2F\U3C-\U3E\U5C\U5E\U7C\U7E\UAC\UB1\UD7\UF7'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 " List of all valid operator chars above \UFF
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 " Written with ranges for performance reasons
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 " The list contains the following characters: '…⁝⅋←↑→↓↔↚↛↜↝↞↠↢↣↤↦↩↪↫↬↮↶↷↺↻↼↽⇀⇁⇄⇆⇇⇉⇋⇌⇍⇎⇏⇐⇒⇔⇚⇛⇜⇝⇠⇢⇴⇵⇶⇷⇸⇹⇺⇻⇼⇽⇾⇿∈∉∊∋∌∍∓∔∗∘∙√∛∜∝∤∥∦∧∨∩∪∷∸∺∻∽∾≀≁≂≃≄≅≆≇≈≉≊≋≌≍≎≏≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≠≡≢≣≤≥≦≧≨≩≪≫≬≭≮≯≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿⊀⊁⊂⊃⊄⊅⊆⊇⊈⊉⊊⊋⊍⊎⊏⊐⊑⊒⊓⊔⊕⊖⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡⊢⊣⊩⊬⊮⊰⊱⊲⊳⊴⊵⊶⊷⊻⊼⊽⋄⋅⋆⋇⋉⋊⋋⋌⋍⋎⋏⋐⋑⋒⋓⋕⋖⋗⋘⋙⋚⋛⋜⋝⋞⋟⋠⋡⋢⋣⋤⋥⋦⋧⋨⋩⋪⋫⋬⋭⋮⋯⋰⋱⋲⋳⋴⋵⋶⋷⋸⋹⋺⋻⋼⋽⋾⋿⌿▷⟂⟈⟉⟑⟒⟕⟖⟗⟰⟱⟵⟶⟷⟹⟺⟻⟼⟽⟾⟿⤀⤁⤂⤃⤄⤅⤆⤇⤈⤉⤊⤋⤌⤍⤎⤏⤐⤑⤒⤓⤔⤕⤖⤗⤘⤝⤞⤟⤠⥄⥅⥆⥇⥈⥉⥊⥋⥌⥍⥎⥏⥐⥑⥒⥓⥔⥕⥖⥗⥘⥙⥚⥛⥜⥝⥞⥟⥠⥡⥢⥣⥤⥥⥦⥧⥨⥩⥪⥫⥬⥭⥮⥯⥰⦷⦸⦼⦾⦿⧀⧁⧡⧣⧤⧥⧴⧶⧷⧺⧻⨇⨈⨝⨟⨢⨣⨤⨥⨦⨧⨨⨩⨪⨫⨬⨭⨮⨰⨱⨲⨳⨴⨵⨶⨷⨸⨹⨺⨻⨼⨽⩀⩁⩂⩃⩄⩅⩊⩋⩌⩍⩎⩏⩐⩑⩒⩓⩔⩕⩖⩗⩘⩚⩛⩜⩝⩞⩟⩠⩡⩢⩣⩦⩧⩪⩫⩬⩭⩮⩯⩰⩱⩲⩳⩴⩵⩶⩷⩸⩹⩺⩻⩼⩽⩾⩿⪀⪁⪂⪃⪄⪅⪆⪇⪈⪉⪊⪋⪌⪍⪎⪏⪐⪑⪒⪓⪔⪕⪖⪗⪘⪙⪚⪛⪜⪝⪞⪟⪠⪡⪢⪣⪤⪥⪦⪧⪨⪩⪪⪫⪬⪭⪮⪯⪰⪱⪲⪳⪴⪵⪶⪷⪸⪹⪺⪻⪼⪽⪾⪿⫀⫁⫂⫃⫄⫅⫆⫇⫈⫉⫊⫋⫌⫍⫎⫏⫐⫑⫒⫓⫔⫕⫖⫗⫘⫙⫛⫷⫸⫹⫺⬰⬱⬲⬳⬴⬵⬶⬷⬸⬹⬺⬻⬼⬽⬾⬿⭀⭁⭂⭃⭄⭇⭈⭉⭊⭋⭌←↑→↓'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 let s:op_chars_wc = '\U2026\U205D\U214B\U2190-\U2194\U219A-\U219E\U21A0\U21A2-\U21A4\U21A6\U21A9-\U21AC\U21AE\U21B6\U21B7\U21BA-\U21BD\U21C0\U21C1\U21C4\U21C6\U21C7\U21C9\U21CB-\U21D0\U21D2\U21D4\U21DA-\U21DD\U21E0\U21E2\U21F4-\U21FF\U2208-\U220D\U2213\U2214\U2217-\U221D\U2224-\U222A\U2237\U2238\U223A\U223B\U223D\U223E\U2240-\U228B\U228D-\U229C\U229E-\U22A3\U22A9\U22AC\U22AE\U22B0-\U22B7\U22BB-\U22BD\U22C4-\U22C7\U22C9-\U22D3\U22D5-\U22FF\U233F\U25B7\U27C2\U27C8\U27C9\U27D1\U27D2\U27D5-\U27D7\U27F0\U27F1\U27F5-\U27F7\U27F9-\U27FF\U2900-\U2918\U291D-\U2920\U2944-\U2970\U29B7\U29B8\U29BC\U29BE-\U29C1\U29E1\U29E3-\U29E5\U29F4\U29F6\U29F7\U29FA\U29FB\U2A07\U2A08\U2A1D\U2A1F\U2A22-\U2A2E\U2A30-\U2A3D\U2A40-\U2A45\U2A4A-\U2A58\U2A5A-\U2A63\U2A66\U2A67\U2A6A-\U2AD9\U2ADB\U2AF7-\U2AFA\U2B30-\U2B44\U2B47-\U2B4C\UFFE9-\UFFEC'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 " Full operators regex
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 let s:operators = '\%(' . '\.\%([-+*/^÷%|&⊻]\|//\|\\\|>>\|>>>\?\)\?=' .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 \ '\|' . '[:<>]=\|||\|&&\||>\|<|\|[<>:]:\|<<\|>>>\?\|//\|[-=]>\|\.\.\.\?' .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 \ '\|' . '\.\?[!' . s:op_chars . s:op_chars_wc . ']' .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 \ '\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 " Characters that can be used to start an identifier. Above \UBF we don't
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 " bother checking. (If a UTF8 operator is used, it will take precedence anyway.)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 let s:id_charsH = '\%([A-Za-z_\UA2-\UA6\UA9\UAA\UAE\UB0\UB5\UBA]\|[^\U00-\UBF]\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 " Characters that can appear in an identifier, starting in 2nd position. Above
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 " \UBF we check for operators since we need to stop the identifier if one
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 " appears. We don't check for invalid characters though.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 let s:id_charsW = '\%([0-9A-Za-z_!\UA2-\UA6\UA9\UAA\UAE-\UB0\UB2-\UB5\UB8-\UBA\UBC-\UBE]\|[^\U00-\UBF]\@=[^' . s:op_chars_wc . ']\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 " A valid julia identifier, more or less
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 let s:idregex = '\%(' . s:id_charsH . s:id_charsW . '*\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 syn case match
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 syntax cluster juliaExpressions contains=@juliaParItems,@juliaStringItems,@juliaKeywordItems,@juliaBlocksItems,@juliaTypesItems,@juliaConstItems,@juliaMacroItems,@juliaSymbolItems,@juliaOperatorItems,@juliaNumberItems,@juliaCommentItems,@juliaErrorItems,@juliaSyntaxRegions
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 syntax cluster juliaExprsPrintf contains=@juliaExpressions,@juliaPrintfItems
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 syntax cluster juliaExprsNodot contains=@juliaParItems,@juliaStringItems,@juliaMacroItems,@juliaSymbolItems,@juliaOperatorItems,@juliaCommentItems,juliaIdSymbol
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraIdxBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 syntax cluster juliaKeywordItems contains=juliaKeyword,juliaWhereKeyword,juliaImportLine,juliaInfixKeyword,juliaRepKeyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90 syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91 syntax cluster juliaTypesItems contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
93 syntax cluster juliaConstItems contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstMMap,juliaConstC,juliaConstGeneric,juliaConstIO,juliaPossibleEuler
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95 syntax cluster juliaMacroItems contains=juliaPossibleMacro,juliaDollarVar,juliaDollarPar,juliaDollarSqBra
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
96 syntax cluster juliaSymbolItems contains=juliaPossibleSymbol
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
97 syntax cluster juliaNumberItems contains=juliaNumbers
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
98 syntax cluster juliaStringItems contains=juliaChar,juliaString,juliabString,juliasString,juliaShellString,juliaDocString,juliaRegEx
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
99 syntax cluster juliaPrintfItems contains=juliaPrintfParBlock,juliaPrintfString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
100 syntax cluster juliaOperatorItems contains=juliaOperator,juliaRangeOperator,juliaCTransOperator,juliaTernaryRegion,juliaColon,juliaSemicolon,juliaComma
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
101 syntax cluster juliaCommentItems contains=juliaCommentL,juliaCommentM
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
102 syntax cluster juliaErrorItems contains=juliaErrorPar,juliaErrorEnd,juliaErrorElse,juliaErrorCatch,juliaErrorFinally
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
103
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
104 syntax cluster juliaSyntaxRegions contains=juliaIdSymbol,juliaTypeOperatorR2,juliaTypeOperatorR3,juliaWhereR,juliaDotted
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
105
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
106 syntax cluster juliaSpellcheckStrings contains=@spell
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
107 syntax cluster juliaSpellcheckDocStrings contains=@spell
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
108 syntax cluster juliaSpellcheckComments contains=@spell
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
109
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110 if !s:julia_spellcheck_docstrings
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111 syntax cluster juliaSpellcheckDocStrings remove=@spell
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112 endif
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113 if !s:julia_spellcheck_strings
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
114 syntax cluster juliaSpellcheckStrings remove=@spell
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
115 endif
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
116 if !s:julia_spellcheck_comments
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
117 syntax cluster juliaSpellcheckComments remove=@spell
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
118 endif
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
119
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
120 syntax match juliaSemicolon display ";"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
121 syntax match juliaComma display ","
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
122 syntax match juliaColon display ":"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
123
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
124 " A dot can introduce a sort of 'environment' such that words after it are not
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
125 " recognized as keywords. This has low precedence so that it can be overridden
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
126 " by operators
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
127 syntax match juliaDotted transparent "\.\s*[^])}.]" contains=@juliaExprsNodot
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
128 syntax match juliaDottedT contained transparent "\.\s*[^])}.]" contains=@juliaExprsNodot,juliaType
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
129
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
130 syntax match juliaErrorPar display "[])}]"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
131 syntax match juliaErrorEnd display "\<end\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
132 syntax match juliaErrorElse display "\<\%(else\|elseif\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
133 syntax match juliaErrorCatch display "\<catch\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
134 syntax match juliaErrorFinally display "\<finally\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
135 syntax match juliaErrorSemicol display contained ";"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
136
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
137 syntax region juliaParBlock matchgroup=juliaParDelim start="(" end=")" contains=@juliaExpressions,juliaComprehensionFor
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
138 syntax region juliaParBlockInRange matchgroup=juliaParDelim contained start="(" end=")" contains=@juliaExpressions,juliaParBlockInRange,juliaRangeKeyword,juliaComprehensionFor
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
139 syntax region juliaSqBraIdxBlock matchgroup=juliaParDelim start="\[" end="\]" contains=@juliaExpressions,juliaParBlockInRange,juliaRangeKeyword,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
140 exec 'syntax region juliaSqBraBlock matchgroup=juliaParDelim start="\%(^\|\s\|' . s:operators . '\)\@'.s:d(3).'<=\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
141 syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" contains=juliaType,juliaDottedT,@juliaExpressions
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
142
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
143 exec 'syntax match juliaType contained "\%(' . s:idregex . '\.\)*\zs' . s:idregex . '"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
144
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
145 " This is a generic identifier followed by some symbol, either a type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
146 " operator (<: or >:), or an open parenthesis, or an open curly bracket.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
147 " It's used to recognize one of the contained regions looking for identifiers
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
148 " only once. Once recognized, those regions no longer need to use the
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
149 " expensive s:idregex.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
150 exec 'syntax match juliaIdSymbol transparent "' . s:idregex . '\%(\s*[<>]:\|\.\?(\|{\|\"\)\@=" contains=juliaFunctionCall,juliaParamType,juliaStringPrefixed,juliaTypeOperatorR1'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
151
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
152 syntax match juliaFunctionCall contained "[^{([:space:]<>\"]\+(\@=" nextgroup=juliaParBlock
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
153
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
154 exec 'syntax match juliaFunctionDef contained transparent "\%(\<\%(function\|macro\)\)\@'.s:d(8).'<=\s\+\zs' . s:idregex . '\%(\.' . s:idregex . '\)*\ze\s*\%((\|\send\>\|$\)" contains=juliaFunctionName'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
155 exec 'syntax match juliaFunctionName contained "\%(\<\%(function\|macro\)\s\+\)\@'.s:d(20).'<=\%(' . s:idregex . '\.\)*\zs' . s:idregex . '"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
156
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
157 exec 'syntax match juliaStructR contained transparent "\%(\<\%(\%(mutable\s\+\)\?struct\|\%(abstract\|primitive\)\s\+type\)\s\+\)\@'.s:d(20).'<=\%(' . s:idregex . '\.\)*' . s:idregex . '\>\(\s*(\)\@!" contains=juliaType'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
158
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
159 syntax match juliaKeyword display "\<\%(return\|local\|global\|const\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
160 syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
161
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
162 " The import/export/using keywords introduce a sort of special parsing
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
163 " environment with its own rules
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
164 exec 'syntax region juliaImportLine matchgroup=juliaKeyword excludenl start="\<\%(import\|using\|export\)\>" skip="\%(\%(\<\%(import\|using\|export\)\>\)\|^\)\@'.s:d(6).'<=$" end="$" end="\%([])}]\)\@=" contains=@juliaExpressions,juliaAsKeyword,@juliaContinuationItems,juliaMacroName'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
165 syntax match juliaAsKeyword display contained "\<as\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
166
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
167 syntax match juliaRepKeyword display "\<\%(break\|continue\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
168 syntax region juliaConditionalBlock matchgroup=juliaConditional start="\<if\>" end="\<end\>" contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
169 syntax region juliaConditionalEIBlock matchgroup=juliaConditional transparent contained start="\<elseif\>" end="\<\%(end\|else\|elseif\)\>"me=s-1 contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
170 syntax region juliaConditionalEBlock matchgroup=juliaConditional transparent contained start="\<else\>" end="\<end\>"me=s-1 contains=@juliaExpressions
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
171 syntax region juliaWhileBlock matchgroup=juliaRepeat start="\<while\>" end="\<end\>" contains=@juliaExpressions fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
172 syntax region juliaForBlock matchgroup=juliaRepeat start="\<for\>" end="\<end\>" contains=@juliaExpressions,juliaOuter fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
173 syntax region juliaBeginBlock matchgroup=juliaBlKeyword start="\<begin\>" end="\<end\>" contains=@juliaExpressions fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
174 syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="\<function\>" end="\<end\>" contains=@juliaExpressions,juliaFunctionDef fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
175 syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="\<macro\>" end="\<end\>" contains=@juliaExpressions,juliaFunctionDef fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
176 syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="\<quote\>" end="\<end\>" contains=@juliaExpressions fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
177 syntax region juliaStructBlock matchgroup=juliaBlKeyword start="\<struct\>" end="\<end\>" contains=@juliaExpressions,juliaStructR fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
178 syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="\<mutable\s\+struct\>" end="\<end\>" contains=@juliaExpressions,juliaStructR fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
179 syntax region juliaLetBlock matchgroup=juliaBlKeyword start="\<let\>" end="\<end\>" contains=@juliaExpressions fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
180 syntax region juliaDoBlock matchgroup=juliaBlKeyword start="\<do\>" end="\<end\>" contains=@juliaExpressions fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
181 syntax region juliaModuleBlock matchgroup=juliaBlKeyword start="\<\%(bare\)\?module\>" end="\<end\>" contains=@juliaExpressions fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
182 syntax region juliaExceptionBlock matchgroup=juliaException start="\<try\>" end="\<end\>" contains=@juliaExpressions,juliaCatchBlock,juliaFinallyBlock fold
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
183 syntax region juliaCatchBlock matchgroup=juliaException transparent contained start="\<catch\>" end="\<end\>"me=s-1 contains=@juliaExpressions,juliaFinallyBlock
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
184 syntax region juliaFinallyBlock matchgroup=juliaException transparent contained start="\<finally\>" end="\<end\>"me=s-1 contains=@juliaExpressions
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
185 syntax region juliaAbstractBlock matchgroup=juliaBlKeyword start="\<abstract\s\+type\>" end="\<end\>" fold contains=@juliaExpressions,juliaStructR
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
186 syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="\<primitive\s\+type\>" end="\<end\>" fold contains=@juliaExpressions,juliaStructR
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
187
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
188 exec 'syntax region juliaComprehensionFor matchgroup=juliaComprehensionFor transparent contained start="\%([^[:space:],;:({[]\_s*\)\@'.s:d(80).'<=\<for\>" end="\ze[]);]" contains=@juliaExpressions,juliaComprehensionIf,juliaComprehensionFor'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
189 syntax match juliaComprehensionIf contained "\<if\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
190
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
191 exec 'syntax match juliaOuter contained "\<outer\ze\s\+' . s:idregex . '\>"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
192
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
193 syntax match juliaRangeKeyword contained "\<\%(begin\|end\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
194
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
195 syntax match juliaBaseTypeBasic display "\<\%(\%(N\|Named\)\?Tuple\|Symbol\|Function\|Union\%(All\)\?\|Type\%(Name\|Var\)\?\|Any\|ANY\|Vararg\|Ptr\|Exception\|Module\|Expr\|DataType\|\%(LineNumber\|Quote\)Node\|\%(Weak\|Global\)\?Ref\|Method\|Pair\|Val\|Nothing\|Some\|Missing\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
196 syntax match juliaBaseTypeNum display "\<\%(U\?Int\%(8\|16\|32\|64\|128\)\?\|Float\%(16\|32\|64\)\|Complex\|Bool\|Char\|Number\|Signed\|Unsigned\|Integer\|AbstractFloat\|Real\|Rational\|\%(Abstract\)\?Irrational\|Enum\|BigInt\|BigFloat\|MathConst\|ComplexF\%(16\|32\|64\)\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
197 syntax match juliaBaseTypeC display "\<\%(FileOffset\|C\%(u\?\%(char\|short\|int\|long\(long\)\?\|w\?string\)\|float\|double\|\%(ptrdiff\|s\?size\|wchar\|off\|u\?intmax\)_t\|void\)\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
198 syntax match juliaBaseTypeError display "\<\%(\%(Bounds\|Divide\|Domain\|\%(Stack\)\?Overflow\|EOF\|Undef\%(Ref\|Var\)\|System\|Type\|Parse\|Argument\|Key\|Load\|Method\|Inexact\|OutOfMemory\|Init\|Assertion\|ReadOnlyMemory\|StringIndex\)Error\|\%(Interrupt\|Error\|ProcessExited\|Captured\|Composite\|InvalidState\|Missing\|\%(Process\|Task\)Failed\)Exception\|DimensionMismatch\|SegmentationFault\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
199 syntax match juliaBaseTypeIter display "\<\%(EachLine\|Enumerate\|Cartesian\%(Index\|Range\)\|LinSpace\|CartesianIndices\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
200 syntax match juliaBaseTypeString display "\<\%(DirectIndex\|Sub\|Rep\|Rev\|Abstract\|Substitution\)\?String\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
201 syntax match juliaBaseTypeArray display "\<\%(\%(Sub\)\?Array\|\%(Abstract\|Dense\|Strided\)\?\%(Array\|Matrix\|Vec\%(tor\|OrMat\)\)\|SparseMatrixCSC\|\%(AbstractSparse\|Bit\|Shared\)\%(Array\|Vector\|Matrix\)\|\%\(D\|Bid\|\%(Sym\)\?Trid\)iagonal\|Hermitian\|Symmetric\|UniformScaling\|\%(Lower\|Upper\)Triangular\|\%(Sparse\|Row\)Vector\|VecElement\|Conj\%(Array\|Matrix\|Vector\)\|Index\%(Cartesian\|Linear\|Style\)\|PermutedDimsArray\|Broadcasted\|Adjoint\|Transpose\|LinearIndices\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
202 syntax match juliaBaseTypeDict display "\<\%(WeakKey\|Id\|Abstract\)\?Dict\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
203 syntax match juliaBaseTypeSet display "\<\%(\%(Abstract\|Bit\)\?Set\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
204 syntax match juliaBaseTypeIO display "\<\%(IO\%(Stream\|Buffer\|Context\)\?\|RawFD\|StatStruct\|FileMonitor\|PollingFileWatcher\|Timer\|Base64\%(Decode\|Encode\)Pipe\|\%(UDP\|TCP\)Socket\|\%(Abstract\)\?Channel\|BufferStream\|ReentrantLock\|GenericIOBuffer\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
205 syntax match juliaBaseTypeProcess display "\<\%(Pipe\|Cmd\|PipeBuffer\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
206 syntax match juliaBaseTypeRange display "\<\%(Dims\|RangeIndex\|\%(Abstract\|Lin\|Ordinal\|Step\|\%(Abstract\)\?Unit\)Range\|Colon\|ExponentialBackOff\|StepRangeLen\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
207 syntax match juliaBaseTypeRegex display "\<Regex\%(Match\)\?\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
208 syntax match juliaBaseTypeFact display "\<\%(Factorization\|BunchKaufman\|\%(Cholesky\|QR\)\%(Pivoted\)\?\|\%(Generalized\)\?\%(Eigen\|SVD\|Schur\)\|Hessenberg\|LDLt\|LQ\|LU\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
209 syntax match juliaBaseTypeSort display "\<\%(Insertion\|\(Partial\)\?Quick\|Merge\)Sort\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
210 syntax match juliaBaseTypeRound display "\<Round\%(ingMode\|FromZero\|Down\|Nearest\%(Ties\%(Away\|Up\)\)\?\|ToZero\|Up\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
211 syntax match juliaBaseTypeSpecial display "\<\%(LocalProcess\|ClusterManager\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
212 syntax match juliaBaseTypeRandom display "\<\%(AbstractRNG\|MersenneTwister\|RandomDevice\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
213 syntax match juliaBaseTypeDisplay display "\<\%(Text\(Display\)\?\|\%(Abstract\)\?Display\|MIME\|HTML\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
214 syntax match juliaBaseTypeTime display "\<\%(Date\%(Time\)\?\|DateFormat\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
215 syntax match juliaBaseTypeOther display "\<\%(RemoteRef\|Task\|Condition\|VersionNumber\|IPv[46]\|SerializationState\|WorkerConfig\|Future\|RemoteChannel\|IPAddr\|Stack\%(Trace\|Frame\)\|\(Caching\|Worker\)Pool\|AbstractSerializer\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
216
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
217 syntax match juliaConstNum display "\%(\<\%(\%(NaN\|Inf\)\%(16\|32\|64\)\?\|pi\|π\)\>\)"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
218 " Note: recognition of ℯ, which Vim does not consider a valid identifier, is
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
219 " complicated. We detect possible uses by just looking for the character (for
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
220 " performance) and then check that it's actually used by its own.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
221 " (This also tries to detect preceding number constants; it does so in a crude
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
222 " way.)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
223 syntax match juliaPossibleEuler "ℯ" contains=juliaEuler
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
224 exec 'syntax match juliaEuler contained "\%(\%(^\|[' . s:nonidS_chars . s:op_chars_wc . ']\)\%(.\?[0-9][.0-9eEf_]*\d\)\?\)\@'.s:d(80).'<=ℯ\ze[' . s:nonidS_chars . s:op_chars_wc . ']"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
225 syntax match juliaConstBool display "\<\%(true\|false\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
226 syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|PROGRAM_FILE\|DEPOT_PATH\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
227 syntax match juliaConstIO display "\<\%(std\%(out\|in\|err\)\|devnull\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
228 syntax match juliaConstC display "\<\%(C_NULL\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
229 syntax match juliaConstGeneric display "\<\%(nothing\|Main\|undef\|missing\)\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
230
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
231 syntax match juliaParamType contained "[^{([:space:]<>\"]\+\ze{" nextgroup=juliaCurBraBlock
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
232
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
233 syntax match juliaPossibleMacro transparent "@" contains=juliaMacroCall,juliaMacroCallP,juliaPrintfMacro,juliaDocMacro,juliaDocMacroPre
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
234
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
235 exec 'syntax match juliaMacro contained "@' . s:idregex . '\%(\.' . s:idregex . '\)*"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
236 syntax match juliaMacro contained "@[!.~$%^*/\\|<>+-]\ze[^0-9]"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
237 exec 'syntax region juliaMacroCall contained transparent start="\(@' . s:idregex . '\%(\.' . s:idregex . '\)*\)\@=\1\%([^(]\|$\)" end="\ze\%([])};#]\|$\|\<for\>\|\<end\>\)" contains=@juliaExpressions,juliaMacro,juliaSymbolS,juliaQuotedParBlockS'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
238 exec 'syntax region juliaMacroCall contained transparent start="\(@.\)\@=\1\%([^(]\|$\)" end="\ze\%([])};#]\|$\|\<for\>\|\<end\>\)" contains=@juliaExpressions,juliaMacro,juliaSymbolS,juliaQuotedParBlockS'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
239 exec 'syntax region juliaMacroCallP contained transparent start="@' . s:idregex . '\%(\.' . s:idregex . '\)*(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaParBlock'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
240 exec 'syntax region juliaMacroCallP contained transparent start="@.(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaParBlock'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
241
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
242 exec 'syntax match juliaNumbers transparent "\%(^\|[' . s:nonidS_chars . s:op_chars_wc . ']\)\@'.s:d(1).'<=\d\|\.\d\|im\>" contains=juliaNumber,juliaFloat,juliaComplexUnit'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
243
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
244 "integer regexes
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
245 let s:dec_regex = '\d\%(_\?\d\)*\%(\>\|im\>\|\ze\D\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
246 let s:hex_regex = '0x\x\%(_\?\x\)*\%(\>\|im\>\|\ze\X\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
247 let s:bin_regex = '0b[01]\%(_\?[01]\)*\%(\>\|im\>\|\ze[^01]\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
248 let s:oct_regex = '0o\o\%(_\?\o\)*\%(\>\|im\>\|\ze\O\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
249
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
250 let s:int_regex = '\%(' . s:hex_regex .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
251 \ '\|' . s:bin_regex .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
252 \ '\|' . s:oct_regex .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
253 \ '\|' . s:dec_regex .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
254 \ '\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
255
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
256 "floating point regexes
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
257 " starting with a dot, optional exponent
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
258 let s:float_regex1 = '\.\d\%(_\?\d\)*\%([eEf][-+]\?\d\+\)\?\%(\>\|im\>\|\ze\D\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
259 " with dot, optional exponent
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
260 let s:float_regex2 = '\d\%(_\?\d\)*\.\%(\d\%(_\?\d\)*\)\?\%([eEf][-+]\?\d\+\)\?\%(\>\|im\>\|\ze\D\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
261 " without dot, with exponent
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
262 let s:float_regex3 = '\d\%(_\?\d\)*[eEf][-+]\?\d\+\%(\>\|im\>\|\ze\D\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
263
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
264 "hex floating point numbers
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
265 " starting with a dot
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
266 let s:hexfloat_regex1 = '0x\.\%\(\x\%(_\?\x\)*\)\?[pP][-+]\?\d\+\%(\>\|im\>\|\ze\X\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
267 " starting with a digit
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
268 let s:hexfloat_regex2 = '0x\x\%(_\?\x\)*\%\(\.\%\(\x\%(_\?\x\)*\)\?\)\?[pP][-+]\?\d\+\%(\>\|im\>\|\ze\X\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
269
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
270 let s:float_regex = '\%(' . s:float_regex3 .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
271 \ '\|' . s:float_regex2 .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
272 \ '\|' . s:float_regex1 .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
273 \ '\|' . s:hexfloat_regex2 .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
274 \ '\|' . s:hexfloat_regex1 .
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
275 \ '\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
276
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
277 exec 'syntax match juliaNumber contained "' . s:int_regex . '" contains=juliaComplexUnit'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
278 exec 'syntax match juliaFloat contained "' . s:float_regex . '" contains=juliaComplexUnit'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
279 syntax match juliaComplexUnit display contained "\<im\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
280
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
281 syntax match juliaRangeOperator display ":"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
282 exec 'syntax match juliaOperator "' . s:operators . '"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
283
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
284 exec 'syntax region juliaTernaryRegion matchgroup=juliaTernaryOperator start="\s\zs?\ze\s" skip="\%(:\(:\|[^:[:space:]'."'".'"({[]\+\s*\ze:\)\|\%(?\s*\)\@'.s:d(6).'<=:(\)" end=":" contains=@juliaExpressions,juliaErrorSemicol'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
285
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
286 let s:interp_dollar = '\([' . s:nonidS_chars . s:op_chars_wc . '!]\|^\)\@'.s:d(1).'<=\$'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
287
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
288 exec 'syntax match juliaDollarVar display contained "' . s:interp_dollar . s:idregex . '"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
289 exec 'syntax region juliaDollarPar matchgroup=juliaDollarVar contained start="' .s:interp_dollar . '(" end=")" contains=@juliaExpressions'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
290 exec 'syntax region juliaDollarSqBra matchgroup=juliaDollarVar contained start="' .s:interp_dollar . '\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
291
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
292 syntax match juliaChar "'\\\?.'" contains=juliaSpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
293 syntax match juliaChar display "'\\\o\{3\}'" contains=juliaOctalEscapeChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
294 syntax match juliaChar display "'\\x\x\{2\}'" contains=juliaHexEscapeChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
295 syntax match juliaChar display "'\\u\x\{1,4\}'" contains=juliaUniCharSmall
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
296 syntax match juliaChar display "'\\U\x\{1,8\}'" contains=juliaUniCharLarge
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
297
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
298 exec 'syntax match juliaCTransOperator "[[:space:]}' . s:nonid_chars . s:op_chars_wc . '!]\@'.s:d(1).'<!\.\?' . "'" . 'ᵀ\?"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
299
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
300 " TODO: some of these might be specialized; the rest could be just left to the
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
301 " generic juliaStringPrefixed fallback
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
302 syntax region juliaString matchgroup=juliaStringDelim start=+\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckStrings
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
303 syntax region juliaStringPrefixed contained matchgroup=juliaStringDelim start=+[^{([:space:]<>"]\+\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
304 syntax region juliabString matchgroup=juliaStringDelim start=+\<b\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
305 syntax region juliasString matchgroup=juliaStringDelim start=+\<s\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
306
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
307 syntax region juliaDocString matchgroup=juliaDocStringDelim fold start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
308
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
309 exec 'syntax region juliaPrintfMacro contained transparent start="@s\?printf(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaPrintfParBlock'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
310 syntax region juliaPrintfMacro contained transparent start="@s\?printf\s\+" end="\ze\%([])};#]\|$\|\<for\>\)" contains=@juliaExprsPrintf,juliaMacro,juliaSymbolS,juliaQuotedParBlockS
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
311 syntax region juliaPrintfParBlock contained matchgroup=juliaParDelim start="(" end=")" contains=@juliaExprsPrintf
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
312 syntax region juliaPrintfString contained matchgroup=juliaStringDelim start=+"+ skip=+\%(\\\\\)*\\"+ end=+"+ contains=@juliaSpecialChars,@juliaPrintfChars
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
313
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
314 exec 'syntax region juliaDocMacroPre contained transparent start=+@doc\s\+\%(' . s:idregex . '\%(\.' . s:idregex . '\)*\)\z("\%(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\(\z1\)\@'.s:d(3).'<=+ contains=juliaMacro,juliaDocStringMRaw'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
315 exec 'syntax region juliaDocMacro contained transparent start=+@doc\s\+\z("\%(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\(\z1\)\@'.s:d(3).'<=+ contains=juliaMacro,juliaDocStringM'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
316 syntax region juliaDocStringMRaw contained fold matchgroup=juliaDocStringDelim fold start=+\z\("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpellcheckDocStrings
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
317 syntax region juliaDocStringM contained fold matchgroup=juliaDocStringDelim fold start=+\z\("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
318
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
319 syntax region juliaShellString matchgroup=juliaStringDelim start=+`+ skip=+\%(\\\\\)*\\`+ end=+`+ contains=@juliaStringVars,juliaSpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
320
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
321 syntax cluster juliaStringVars contains=juliaStringVarsPar,juliaStringVarsSqBra,juliaStringVarsCurBra,juliaStringVarsPla
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
322 syntax region juliaStringVarsPar contained matchgroup=juliaStringVarDelim start="$(" end=")" contains=@juliaExpressions
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
323 syntax region juliaStringVarsSqBra contained matchgroup=juliaStringVarDelim start="$\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
324 syntax region juliaStringVarsCurBra contained matchgroup=juliaStringVarDelim start="${" end="}" contains=@juliaExpressions
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
325 exec 'syntax match juliaStringVarsPla contained "\$' . s:idregex . '"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
326
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
327 " TODO improve RegEx
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
328 syntax region juliaRegEx matchgroup=juliaStringDelim start=+\<r\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1[imsx]*+
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
329
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
330 syntax cluster juliaSpecialChars contains=juliaSpecialChar,juliaDoubleBackslash,juliaEscapedQuote,juliaOctalEscapeChar,juliaHexEscapeChar,juliaUniCharSmall,juliaUniCharLarge
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
331 syntax match juliaSpecialChar display contained "\\."
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
332 syntax match juliaOctalEscapeChar display contained "\\\o\{3\}"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
333 syntax match juliaHexEscapeChar display contained "\\x\x\{2\}"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
334 syntax match juliaUniCharSmall display contained "\\u\x\{1,4\}"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
335 syntax match juliaUniCharLarge display contained "\\U\x\{1,8\}"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
336 syntax cluster juliaSpecialCharsRaw contains=juliaDoubleBackslash,juliaEscapedQuote
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
337 syntax match juliaDoubleBackslash contained "\\\\"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
338 syntax match juliaEscapedQuote contained "\\\""
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
339
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
340 syntax cluster juliaPrintfChars contains=juliaErrorPrintfFmt,juliaPrintfFmt
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
341 syntax match juliaErrorPrintfFmt display contained "\\\?%."
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
342 syntax match juliaPrintfFmt display contained "%\%(\d\+\$\)\=[-+' #0]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlLjqzt]\|ll\|hh\)\=[aAbdiuoxXDOUfFeEgGcCsSpn]"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
343 syntax match juliaPrintfFmt display contained "%%"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
344 syntax match juliaPrintfFmt display contained "\\%\%(\d\+\$\)\=[-+' #0]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlLjqzt]\|ll\|hh\)\=[aAbdiuoxXDOUfFeEgGcCsSpn]"hs=s+1
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
345 syntax match juliaPrintfFmt display contained "\\%%"hs=s+1
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
346
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
347 " this is used to restrict the search for Symbols to when colons appear at all
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
348 " (for performance reasons)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
349 syntax match juliaPossibleSymbol transparent ":\ze[^:]" contains=juliaSymbol,juliaQuotedParBlock,juliaQuotedQMarkPar,juliaColon
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
350
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
351 let s:quotable = '\%(' . s:idregex . '\|' . s:operators . '\|[?.]\|' . s:float_regex . '\|' . s:int_regex . '\)'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
352 let s:quoting_colon = '\%(\%(^\s*\|\s\{6,\}\|[' . s:nonid_chars . s:op_chars_wc . ']\s*\)\@'.s:d(6).'<=\|\%(\<\%(return\|if\|else\%(if\)\?\|while\|try\|begin\)\s\+\)\@'.s:d(9).'<=\)\zs:'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
353 let s:quoting_colonS = '\s\@'.s:d(1).'<=:'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
354
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
355 " note: juliaSymbolS only works within whitespace-sensitive contexts,
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
356 " such as in macro calls without parentheses, or within square brackets.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
357 " It is used to override the recognition of expressions like `a :b` as
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
358 " ranges rather than symbols in those contexts.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
359 " (Note that such `a :b` expressions only allows at most 5 spaces between
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
360 " the identifier and the colon anyway.)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
361
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
362 exec 'syntax match juliaSymbol contained "' . s:quoting_colon . s:quotable . '"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
363 exec 'syntax match juliaSymbolS contained "' . s:quoting_colonS . s:quotable . '"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
364
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
365 " same as above for quoted expressions such as :(expr)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
366 exec 'syntax region juliaQuotedParBlock matchgroup=juliaQParDelim start="' . s:quoting_colon . '(" end=")" contains=@juliaExpressions'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
367 exec 'syntax match juliaQuotedQMarkPar "' . s:quoting_colon . '(\s*?\s*)" contains=juliaQuotedQMark'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
368 exec 'syntax region juliaQuotedParBlockS matchgroup=juliaQParDelim contained start="' . s:quoting_colonS . '(" end=")" contains=@juliaExpressions'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
369
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
370
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
371 syntax match juliaTypeOperatorR1 contained "[^{([:space:]<>\"]\+\%(\s*[<>]:\)\@="
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
372
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
373 " force precedence over Symbols
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
374 syntax match juliaTypeOperator contained "[<>:]:"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
375 exec 'syntax match juliaTypeOperatorR2 transparent "[<>:]:\s*\%(' . s:idregex . '\.\)*' . s:idregex . '" contains=juliaTypeOperator,juliaType,juliaDottedT,@juliaExpressions nextgroup=juliaTypeOperator'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
376 syntax match juliaIsaKeyword contained "\<isa\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
377 exec 'syntax match juliaTypeOperatorR3 transparent "\<isa\s\+\%(' . s:idregex . '\.\)*' . s:idregex . '" contains=juliaIsaKeyword,juliaType,juliaDottedT,@juliaExpressions nextgroup=juliaIsaKeyword'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
378
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
379 syntax match juliaWhereKeyword "\<where\>"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
380 exec 'syntax match juliaWhereR transparent "\<where\s\+' . s:idregex . '" contains=juliaWhereKeyword,juliaType,juliaDottedT,juliaIdSymbol'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
381
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
382 syntax region juliaCommentL matchgroup=juliaCommentDelim excludenl start="#\ze\%([^=]\|$\)" end="$" contains=juliaTodo,@juliaSpellcheckComments
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
383 syntax region juliaCommentM matchgroup=juliaCommentDelim fold start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
384 syntax keyword juliaTodo contained TODO FIXME XXX
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
385
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
386 " detect an end-of-line with only whitespace or comments before it
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
387 let s:eol = '\s*\%(\%(\%(#=\%(=#\@!\|[^=]\|\n\)\{-}=#\)\s*\)\+\)\?\%(#=\@!.*\)\?\n'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
388
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
389 " a trailing comma, or colon, or an empty line in an import/using/export
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
390 " multi-line command. Used to recognize the as keyword, and for indentation
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
391 " (this needs to take precedence over normal commas and colons, and comments)
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
392 syntax cluster juliaContinuationItems contains=juliaContinuationComma,juliaContinuationColon,juliaContinuationNone
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
393 exec 'syntax region juliaContinuationComma matchgroup=juliaComma contained start=",\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
394 exec 'syntax region juliaContinuationColon matchgroup=juliaColon contained start=":\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
395 exec 'syntax region juliaContinuationNone matchgroup=NONE contained start="\%(\<\%(import\|using\|export\)\>\|^\)\@'.s:d(6).'<=\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems,juliaAsKeyword'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
396 exec 'syntax match juliaMacroName contained "@' . s:idregex . '\%(\.' . s:idregex . '\)*"'
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
397
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
398 " the following are disabled by default, but
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
399 " can be enabled by entering e.g.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
400 " :hi link juliaParDelim Delimiter
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
401 hi def link juliaParDelim juliaNone
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
402 hi def link juliaSemicolon juliaNone
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
403 hi def link juliaComma juliaNone
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
404 hi def link juliaFunctionCall juliaNone
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
405
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
406 hi def link juliaColon juliaOperator
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
407
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
408 hi def link juliaFunctionName juliaFunction
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
409 hi def link juliaFunctionName1 juliaFunction
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
410 hi def link juliaMacroName juliaMacro
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
411
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
412
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
413 hi def link juliaKeyword Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
414 hi def link juliaWhereKeyword Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
415 hi def link juliaInfixKeyword Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
416 hi def link juliaIsaKeyword Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
417 hi def link juliaAsKeyword Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
418 hi def link juliaRepKeyword Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
419 hi def link juliaBlKeyword Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
420 hi def link juliaConditional Conditional
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
421 hi def link juliaRepeat Repeat
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
422 hi def link juliaException Exception
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
423 hi def link juliaOuter Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
424 hi def link juliaBaseTypeBasic Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
425 hi def link juliaBaseTypeNum Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
426 hi def link juliaBaseTypeC Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
427 hi def link juliaBaseTypeError Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
428 hi def link juliaBaseTypeIter Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
429 hi def link juliaBaseTypeString Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
430 hi def link juliaBaseTypeArray Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
431 hi def link juliaBaseTypeDict Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
432 hi def link juliaBaseTypeSet Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
433 hi def link juliaBaseTypeIO Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
434 hi def link juliaBaseTypeProcess Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
435 hi def link juliaBaseTypeRange Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
436 hi def link juliaBaseTypeRegex Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
437 hi def link juliaBaseTypeFact Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
438 hi def link juliaBaseTypeSort Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
439 hi def link juliaBaseTypeRound Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
440 hi def link juliaBaseTypeSpecial Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
441 hi def link juliaBaseTypeRandom Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
442 hi def link juliaBaseTypeDisplay Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
443 hi def link juliaBaseTypeTime Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
444 hi def link juliaBaseTypeOther Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
445
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
446 hi def link juliaType Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
447 hi def link juliaParamType Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
448 hi def link juliaTypeOperatorR1 Type
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
449
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
450 " NOTE: deprecated constants are not highlighted as such. For once,
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
451 " one can still legitimately use them by importing Base.MathConstants.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
452 " Plus, one-letter variables like `e` and `γ` can be used with other
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
453 " meanings.
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
454 hi def link juliaConstNum Constant
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
455 hi def link juliaEuler Constant
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
456
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
457 hi def link juliaConstEnv Constant
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
458 hi def link juliaConstC Constant
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
459 hi def link juliaConstLimits Constant
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
460 hi def link juliaConstGeneric Constant
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
461 hi def link juliaRangeKeyword Constant
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
462 hi def link juliaConstBool Boolean
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
463 hi def link juliaConstIO Boolean
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
464
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
465 hi def link juliaComprehensionFor Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
466 hi def link juliaComprehensionIf Keyword
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
467
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
468 hi def link juliaDollarVar Identifier
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
469
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
470 hi def link juliaFunction Function
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
471 hi def link juliaMacro Macro
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
472 hi def link juliaSymbol Identifier
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
473 hi def link juliaSymbolS Identifier
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
474 hi def link juliaQParDelim Identifier
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
475 hi def link juliaQuotedQMarkPar Identifier
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
476 hi def link juliaQuotedQMark juliaOperatorHL
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
477
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
478 hi def link juliaNumber Number
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
479 hi def link juliaFloat Float
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
480 hi def link juliaComplexUnit Constant
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
481
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
482 hi def link juliaChar Character
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
483
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
484 hi def link juliaString String
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
485 hi def link juliaStringPrefixed juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
486 hi def link juliabString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
487 hi def link juliasString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
488 hi def link juliavString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
489 hi def link juliarString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
490 hi def link juliaipString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
491 hi def link juliabigString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
492 hi def link juliaMIMEString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
493 hi def link juliarawString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
494 hi def link juliatestString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
495 hi def link juliahtmlString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
496 hi def link juliaint128String juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
497 hi def link juliaPrintfString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
498 hi def link juliaShellString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
499 hi def link juliaDocString juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
500 hi def link juliaDocStringM juliaDocString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
501 hi def link juliaDocStringMRaw juliaDocString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
502 hi def link juliaStringDelim juliaString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
503 hi def link juliaDocStringDelim juliaDocString
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
504 hi def link juliaStringVarsPla Identifier
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
505 hi def link juliaStringVarDelim Identifier
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
506
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
507 hi def link juliaRegEx String
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
508
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
509 hi def link juliaSpecialChar SpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
510 hi def link juliaOctalEscapeChar SpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
511 hi def link juliaHexEscapeChar SpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
512 hi def link juliaUniCharSmall SpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
513 hi def link juliaUniCharLarge SpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
514 hi def link juliaDoubleBackslash SpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
515 hi def link juliaEscapedQuote SpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
516
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
517 hi def link juliaPrintfFmt SpecialChar
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
518
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
519 if s:julia_highlight_operators
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
520 hi! def link juliaOperatorHL Operator
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
521 else
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
522 hi! def link juliaOperatorHL juliaNone
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
523 endif
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
524 hi def link juliaOperator juliaOperatorHL
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
525 hi def link juliaRangeOperator juliaOperatorHL
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
526 hi def link juliaCTransOperator juliaOperatorHL
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
527 hi def link juliaTernaryOperator juliaOperatorHL
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
528 hi def link juliaTypeOperator juliaOperatorHL
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
529
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
530 hi def link juliaCommentL Comment
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
531 hi def link juliaCommentM Comment
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
532 hi def link juliaCommentDelim Comment
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
533 hi def link juliaTodo Todo
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
534
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
535 hi def link juliaErrorPar juliaError
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
536 hi def link juliaErrorEnd juliaError
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
537 hi def link juliaErrorElse juliaError
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
538 hi def link juliaErrorCatch juliaError
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
539 hi def link juliaErrorFinally juliaError
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
540 hi def link juliaErrorSemicol juliaError
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
541 hi def link juliaErrorPrintfFmt juliaError
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
542
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
543 hi def link juliaError Error
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
544
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
545 syntax sync fromstart
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
546
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
547 let b:current_syntax = "julia"
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
548
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
549 let &cpo = s:cpo_save
29ec2c198c8d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
550 unlet s:cpo_save