annotate runtime/syntax/lua.vim @ 9851:eafd017d8a5a

Added tag v7.4.2200 for changeset 67781bb0a61a55adea7ed2394daddbb2e838046e
author Christian Brabandt <cb@256bit.org>
date Fri, 12 Aug 2016 16:30:07 +0200
parents 536aa8b0c934
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
1 " Vim syntax file
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
2 " Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
3 " Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com>
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
4 " First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br>
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
5 " Last Change: 2012 Aug 12
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
6 " Options: lua_version = 4 or 5
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
7 " lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2)
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
8 " default 5.2
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
9
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
10 " For version 5.x: Clear all syntax items
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
11 " For version 6.x: Quit when a syntax file was already loaded
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
12 if version < 600
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
13 syntax clear
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
14 elseif exists("b:current_syntax")
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
15 finish
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
16 endif
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
17
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3237
diff changeset
18 let s:cpo_save = &cpo
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3237
diff changeset
19 set cpo&vim
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3237
diff changeset
20
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
21 if !exists("lua_version")
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
22 " Default is lua 5.2
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
23 let lua_version = 5
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
24 let lua_subversion = 2
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
25 elseif !exists("lua_subversion")
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
26 " lua_version exists, but lua_subversion doesn't. So, set it to 0
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
27 let lua_subversion = 0
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
28 endif
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
29
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
30 syn case match
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
31
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
32 " syncing method
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
33 syn sync minlines=100
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
34
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
35 " Comments
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
36 syn keyword luaTodo contained TODO FIXME XXX
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
37 syn match luaComment "--.*$" contains=luaTodo,@Spell
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
38 if lua_version == 5 && lua_subversion == 0
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
39 syn region luaComment matchgroup=luaComment start="--\[\[" end="\]\]" contains=luaTodo,luaInnerComment,@Spell
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
40 syn region luaInnerComment contained transparent start="\[\[" end="\]\]"
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
41 elseif lua_version > 5 || (lua_version == 5 && lua_subversion >= 1)
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
42 " Comments in Lua 5.1: --[[ ... ]], [=[ ... ]=], [===[ ... ]===], etc.
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
43 syn region luaComment matchgroup=luaComment start="--\[\z(=*\)\[" end="\]\z1\]" contains=luaTodo,@Spell
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
44 endif
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
45
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
46 " First line may start with #!
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
47 syn match luaComment "\%^#!.*"
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
48
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
49 " catch errors caused by wrong parenthesis and wrong curly brackets or
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
50 " keywords placed outside their respective blocks
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
51 syn region luaParen transparent start='(' end=')' contains=ALLBUT,luaParenError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
52 syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaBraceError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
53
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
54 syn match luaParenError ")"
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
55 syn match luaBraceError "}"
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
56 syn match luaError "\<\%(end\|else\|elseif\|then\|until\|in\)\>"
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
57
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
58 " function ... end
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
59 syn region luaFunctionBlock transparent matchgroup=luaFunction start="\<function\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
60
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
61 " if ... then
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
62 syn region luaIfThen transparent matchgroup=luaCond start="\<if\>" end="\<then\>"me=e-4 contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaIn nextgroup=luaThenEnd skipwhite skipempty
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
63
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
64 " then ... end
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
65 syn region luaThenEnd contained transparent matchgroup=luaCond start="\<then\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaThenEnd,luaIn
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
66
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
67 " elseif ... then
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
68 syn region luaElseifThen contained transparent matchgroup=luaCond start="\<elseif\>" end="\<then\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
69
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
70 " else
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
71 syn keyword luaElse contained else
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
72
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
73 " do ... end
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
74 syn region luaBlock transparent matchgroup=luaStatement start="\<do\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
75
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
76 " repeat ... until
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
77 syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<repeat\>" end="\<until\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
78
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
79 " while ... do
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
80 syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<while\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaIn nextgroup=luaBlock skipwhite skipempty
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
81
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
82 " for ... do and for ... in ... do
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
83 syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<for\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd nextgroup=luaBlock skipwhite skipempty
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
84
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
85 syn keyword luaIn contained in
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
86
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
87 " other keywords
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
88 syn keyword luaStatement return local break
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
89 if lua_version > 5 || (lua_version == 5 && lua_subversion >= 2)
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
90 syn keyword luaStatement goto
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
91 syn match luaLabel "::\I\i*::"
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
92 endif
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
93 syn keyword luaOperator and or not
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
94 syn keyword luaConstant nil
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
95 if lua_version > 4
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
96 syn keyword luaConstant true false
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
97 endif
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
98
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
99 " Strings
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
100 if lua_version < 5
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
101 syn match luaSpecial contained "\\[\\abfnrtv\'\"]\|\\[[:digit:]]\{,3}"
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
102 elseif lua_version == 5
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
103 if lua_subversion == 0
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
104 syn match luaSpecial contained #\\[\\abfnrtv'"[\]]\|\\[[:digit:]]\{,3}#
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
105 syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=luaString2,@Spell
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
106 else
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
107 if lua_subversion == 1
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
108 syn match luaSpecial contained #\\[\\abfnrtv'"]\|\\[[:digit:]]\{,3}#
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
109 else " Lua 5.2
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
110 syn match luaSpecial contained #\\[\\abfnrtvz'"]\|\\x[[:xdigit:]]\{2}\|\\[[:digit:]]\{,3}#
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
111 endif
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
112 syn region luaString2 matchgroup=luaString start="\[\z(=*\)\[" end="\]\z1\]" contains=@Spell
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
113 endif
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
114 endif
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 838
diff changeset
115 syn region luaString start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=luaSpecial,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 838
diff changeset
116 syn region luaString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=luaSpecial,@Spell
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
117
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
118 " integer number
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 838
diff changeset
119 syn match luaNumber "\<\d\+\>"
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
120 " floating point number, with dot, optional exponent
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
121 syn match luaNumber "\<\d\+\.\d*\%([eE][-+]\=\d\+\)\=\>"
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
122 " floating point number, starting with a dot, optional exponent
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
123 syn match luaNumber "\.\d\+\%([eE][-+]\=\d\+\)\=\>"
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
124 " floating point number, without dot, with exponent
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
125 syn match luaNumber "\<\d\+[eE][-+]\=\d\+\>"
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 838
diff changeset
126
e63691e7c504 updated for version 7.1a
vimboss
parents: 838
diff changeset
127 " hex numbers
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
128 if lua_version >= 5
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
129 if lua_subversion == 1
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
130 syn match luaNumber "\<0[xX]\x\+\>"
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
131 elseif lua_subversion >= 2
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
132 syn match luaNumber "\<0[xX][[:xdigit:].]\+\%([pP][-+]\=\d\+\)\=\>"
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
133 endif
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 838
diff changeset
134 endif
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
135
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
136 syn keyword luaFunc assert collectgarbage dofile error next
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
137 syn keyword luaFunc print rawget rawset tonumber tostring type _VERSION
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
138
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
139 if lua_version == 4
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
140 syn keyword luaFunc _ALERT _ERRORMESSAGE gcinfo
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
141 syn keyword luaFunc call copytagmethods dostring
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
142 syn keyword luaFunc foreach foreachi getglobal getn
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
143 syn keyword luaFunc gettagmethod globals newtag
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
144 syn keyword luaFunc setglobal settag settagmethod sort
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
145 syn keyword luaFunc tag tinsert tremove
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
146 syn keyword luaFunc _INPUT _OUTPUT _STDIN _STDOUT _STDERR
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
147 syn keyword luaFunc openfile closefile flush seek
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
148 syn keyword luaFunc setlocale execute remove rename tmpname
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
149 syn keyword luaFunc getenv date clock exit
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
150 syn keyword luaFunc readfrom writeto appendto read write
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
151 syn keyword luaFunc PI abs sin cos tan asin
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
152 syn keyword luaFunc acos atan atan2 ceil floor
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
153 syn keyword luaFunc mod frexp ldexp sqrt min max log
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
154 syn keyword luaFunc log10 exp deg rad random
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
155 syn keyword luaFunc randomseed strlen strsub strlower strupper
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
156 syn keyword luaFunc strchar strrep ascii strbyte
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
157 syn keyword luaFunc format strfind gsub
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
158 syn keyword luaFunc getinfo getlocal setlocal setcallhook setlinehook
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
159 elseif lua_version == 5
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
160 syn keyword luaFunc getmetatable setmetatable
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
161 syn keyword luaFunc ipairs pairs
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
162 syn keyword luaFunc pcall xpcall
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
163 syn keyword luaFunc _G loadfile rawequal require
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
164 if lua_subversion == 0
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
165 syn keyword luaFunc getfenv setfenv
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
166 syn keyword luaFunc loadstring unpack
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
167 syn keyword luaFunc gcinfo loadlib LUA_PATH _LOADED _REQUIREDNAME
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
168 else
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
169 syn keyword luaFunc load select
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
170 syn match luaFunc /\<package\.cpath\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
171 syn match luaFunc /\<package\.loaded\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
172 syn match luaFunc /\<package\.loadlib\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
173 syn match luaFunc /\<package\.path\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
174 if lua_subversion == 1
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
175 syn keyword luaFunc getfenv setfenv
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
176 syn keyword luaFunc loadstring module unpack
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
177 syn match luaFunc /\<package\.loaders\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
178 syn match luaFunc /\<package\.preload\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
179 syn match luaFunc /\<package\.seeall\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
180 elseif lua_subversion == 2
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
181 syn keyword luaFunc _ENV rawlen
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
182 syn match luaFunc /\<package\.config\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
183 syn match luaFunc /\<package\.preload\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
184 syn match luaFunc /\<package\.searchers\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
185 syn match luaFunc /\<package\.searchpath\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
186 syn match luaFunc /\<bit32\.arshift\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
187 syn match luaFunc /\<bit32\.band\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
188 syn match luaFunc /\<bit32\.bnot\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
189 syn match luaFunc /\<bit32\.bor\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
190 syn match luaFunc /\<bit32\.btest\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
191 syn match luaFunc /\<bit32\.bxor\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
192 syn match luaFunc /\<bit32\.extract\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
193 syn match luaFunc /\<bit32\.lrotate\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
194 syn match luaFunc /\<bit32\.lshift\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
195 syn match luaFunc /\<bit32\.replace\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
196 syn match luaFunc /\<bit32\.rrotate\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
197 syn match luaFunc /\<bit32\.rshift\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
198 endif
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
199 syn match luaFunc /\<coroutine\.running\>/
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
200 endif
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
201 syn match luaFunc /\<coroutine\.create\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
202 syn match luaFunc /\<coroutine\.resume\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
203 syn match luaFunc /\<coroutine\.status\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
204 syn match luaFunc /\<coroutine\.wrap\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
205 syn match luaFunc /\<coroutine\.yield\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
206 syn match luaFunc /\<string\.byte\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
207 syn match luaFunc /\<string\.char\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
208 syn match luaFunc /\<string\.dump\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
209 syn match luaFunc /\<string\.find\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
210 syn match luaFunc /\<string\.format\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
211 syn match luaFunc /\<string\.gsub\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
212 syn match luaFunc /\<string\.len\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
213 syn match luaFunc /\<string\.lower\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
214 syn match luaFunc /\<string\.rep\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
215 syn match luaFunc /\<string\.sub\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
216 syn match luaFunc /\<string\.upper\>/
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
217 if lua_subversion == 0
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
218 syn match luaFunc /\<string\.gfind\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
219 else
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
220 syn match luaFunc /\<string\.gmatch\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
221 syn match luaFunc /\<string\.match\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
222 syn match luaFunc /\<string\.reverse\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
223 endif
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
224 if lua_subversion == 0
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
225 syn match luaFunc /\<table\.getn\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
226 syn match luaFunc /\<table\.setn\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
227 syn match luaFunc /\<table\.foreach\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
228 syn match luaFunc /\<table\.foreachi\>/
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
229 elseif lua_subversion == 1
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
230 syn match luaFunc /\<table\.maxn\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
231 elseif lua_subversion == 2
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
232 syn match luaFunc /\<table\.pack\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
233 syn match luaFunc /\<table\.unpack\>/
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
234 endif
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
235 syn match luaFunc /\<table\.concat\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
236 syn match luaFunc /\<table\.sort\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
237 syn match luaFunc /\<table\.insert\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
238 syn match luaFunc /\<table\.remove\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
239 syn match luaFunc /\<math\.abs\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
240 syn match luaFunc /\<math\.acos\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
241 syn match luaFunc /\<math\.asin\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
242 syn match luaFunc /\<math\.atan\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
243 syn match luaFunc /\<math\.atan2\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
244 syn match luaFunc /\<math\.ceil\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
245 syn match luaFunc /\<math\.sin\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
246 syn match luaFunc /\<math\.cos\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
247 syn match luaFunc /\<math\.tan\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
248 syn match luaFunc /\<math\.deg\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
249 syn match luaFunc /\<math\.exp\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
250 syn match luaFunc /\<math\.floor\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
251 syn match luaFunc /\<math\.log\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
252 syn match luaFunc /\<math\.max\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
253 syn match luaFunc /\<math\.min\>/
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
254 if lua_subversion == 0
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
255 syn match luaFunc /\<math\.mod\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
256 syn match luaFunc /\<math\.log10\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
257 else
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
258 if lua_subversion == 1
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
259 syn match luaFunc /\<math\.log10\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
260 endif
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
261 syn match luaFunc /\<math\.huge\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
262 syn match luaFunc /\<math\.fmod\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
263 syn match luaFunc /\<math\.modf\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
264 syn match luaFunc /\<math\.cosh\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
265 syn match luaFunc /\<math\.sinh\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
266 syn match luaFunc /\<math\.tanh\>/
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
267 endif
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
268 syn match luaFunc /\<math\.pow\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
269 syn match luaFunc /\<math\.rad\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
270 syn match luaFunc /\<math\.sqrt\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
271 syn match luaFunc /\<math\.frexp\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
272 syn match luaFunc /\<math\.ldexp\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
273 syn match luaFunc /\<math\.random\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
274 syn match luaFunc /\<math\.randomseed\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
275 syn match luaFunc /\<math\.pi\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
276 syn match luaFunc /\<io\.close\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
277 syn match luaFunc /\<io\.flush\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
278 syn match luaFunc /\<io\.input\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
279 syn match luaFunc /\<io\.lines\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
280 syn match luaFunc /\<io\.open\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
281 syn match luaFunc /\<io\.output\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
282 syn match luaFunc /\<io\.popen\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
283 syn match luaFunc /\<io\.read\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
284 syn match luaFunc /\<io\.stderr\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
285 syn match luaFunc /\<io\.stdin\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
286 syn match luaFunc /\<io\.stdout\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
287 syn match luaFunc /\<io\.tmpfile\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
288 syn match luaFunc /\<io\.type\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
289 syn match luaFunc /\<io\.write\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
290 syn match luaFunc /\<os\.clock\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
291 syn match luaFunc /\<os\.date\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
292 syn match luaFunc /\<os\.difftime\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
293 syn match luaFunc /\<os\.execute\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
294 syn match luaFunc /\<os\.exit\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
295 syn match luaFunc /\<os\.getenv\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
296 syn match luaFunc /\<os\.remove\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
297 syn match luaFunc /\<os\.rename\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
298 syn match luaFunc /\<os\.setlocale\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
299 syn match luaFunc /\<os\.time\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
300 syn match luaFunc /\<os\.tmpname\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
301 syn match luaFunc /\<debug\.debug\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
302 syn match luaFunc /\<debug\.gethook\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
303 syn match luaFunc /\<debug\.getinfo\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
304 syn match luaFunc /\<debug\.getlocal\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
305 syn match luaFunc /\<debug\.getupvalue\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
306 syn match luaFunc /\<debug\.setlocal\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
307 syn match luaFunc /\<debug\.setupvalue\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
308 syn match luaFunc /\<debug\.sethook\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
309 syn match luaFunc /\<debug\.traceback\>/
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
310 if lua_subversion == 1
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
311 syn match luaFunc /\<debug\.getfenv\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
312 syn match luaFunc /\<debug\.setfenv\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
313 syn match luaFunc /\<debug\.getmetatable\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
314 syn match luaFunc /\<debug\.setmetatable\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
315 syn match luaFunc /\<debug\.getregistry\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
316 elseif lua_subversion == 2
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
317 syn match luaFunc /\<debug\.getmetatable\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
318 syn match luaFunc /\<debug\.setmetatable\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
319 syn match luaFunc /\<debug\.getregistry\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
320 syn match luaFunc /\<debug\.getuservalue\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
321 syn match luaFunc /\<debug\.setuservalue\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
322 syn match luaFunc /\<debug\.upvalueid\>/
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
323 syn match luaFunc /\<debug\.upvaluejoin\>/
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
324 endif
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
325 endif
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
326
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
327 " Define the default highlighting.
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
328 " For version 5.7 and earlier: only when not done already
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
329 " For version 5.8 and later: only when an item doesn't have highlighting yet
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
330 if version >= 508 || !exists("did_lua_syntax_inits")
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
331 if version < 508
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
332 let did_lua_syntax_inits = 1
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
333 command -nargs=+ HiLink hi link <args>
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
334 else
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
335 command -nargs=+ HiLink hi def link <args>
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
336 endif
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
337
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
338 HiLink luaStatement Statement
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
339 HiLink luaRepeat Repeat
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
340 HiLink luaFor Repeat
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
341 HiLink luaString String
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
342 HiLink luaString2 String
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
343 HiLink luaNumber Number
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
344 HiLink luaOperator Operator
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
345 HiLink luaIn Operator
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
346 HiLink luaConstant Constant
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
347 HiLink luaCond Conditional
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
348 HiLink luaElse Conditional
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
349 HiLink luaFunction Function
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
350 HiLink luaComment Comment
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
351 HiLink luaTodo Todo
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
352 HiLink luaTable Structure
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
353 HiLink luaError Error
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
354 HiLink luaParenError Error
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3356
diff changeset
355 HiLink luaBraceError Error
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
356 HiLink luaSpecial SpecialChar
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
357 HiLink luaFunc Identifier
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
358 HiLink luaLabel Label
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
359
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
360 delcommand HiLink
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
361 endif
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
362
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
363 let b:current_syntax = "lua"
8e5830943bff updated for version 7.0e04
vimboss
parents: 837
diff changeset
364
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3237
diff changeset
365 let &cpo = s:cpo_save
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3237
diff changeset
366 unlet s:cpo_save
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1121
diff changeset
367 " vim: et ts=8 sw=2