1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
|
syntax .lua-long-string
state body string
char ] end-match
eat this
state end-match string
heredocend end
noeat body
state end string
char ] END string
noeat body
syntax .lua-long-comment
state body comment
char ] end-match
eat this
state end-match comment
heredocend end
noeat body
state end comment
char ] END comment
noeat body
syntax .lua-escape
state escape
char "abfnrtv\\\"'" END special
char x hex1
char 0-1 decimal-low
char 2 decimal-two
char 3-9 decimal-high
noeat short
state hex1 special
char 0-9a-fA-F hex2
noeat short
state hex2 special
char 0-9a-fA-F END special
noeat short
state decimal-low special
char 0-9 decimal-last
noeat END
state decimal-last special
char 0-9 END special
noeat END
state decimal-two special
char 0-4 decimal-last
char 5 decimal-two-five
char 6-9 decimal-short
noeat END
state decimal-two-five special
char 0-5 END special
char 6-9 END error
noeat END
state decimal-high special
char 0-9 decimal-short
noeat END
state decimal-short special
char 0-9 END error
noeat END
state short special
char -n "\n" END error
noeat END
syntax lua
list constant false true nil
list opword and or not
list keyword \
do end while repeat until if elseif then else for in \
function local return goto break
state first-line
char " \t" this
char # line-comment
noeat code
state code
char -b a-zA-Z_ identifier
char 0 zero
char 1-9 decimal
char \' single-quote
char \" double-quote
char \- dash
char [ bracket
char -b : colon
str '~=' this operator
char =/+*#<>^%|&~ this operator
str '...' this special
str '..' this operator
char . dot
char '!@`$?' this error
eat this
state bracket string
char [ .lua-long-string:code string
char -b = bracket-equals
recolor default 1
noeat code
state colon
char -b : colon-colon
noeat code
state colon-colon
char -b a-zA-Z_ colon-colon-name
eat code error
state colon-colon-name
char -b a-zA-Z0-9_ this
char -b : colon-colon-name-colon
eat code error
state colon-colon-name-colon
char -b : label
eat code error
state label
recolor label
noeat code
state bracket-equals string
char -b = this
char -n [ code error
heredocbegin .lua-long-string code
state dash operator
char \- dash-dash
noeat code
state dash-dash comment
recolor comment 2
char "\n" code
char [ dash-dash-bracket
eat line-comment comment
state dash-dash-bracket comment
char [ .lua-long-comment:code comment
char -b = dash-dash-bracket-equals comment
eat line-comment
state dash-dash-bracket-equals
char -b = this comment
char -n [ line-comment
heredocbegin .lua-long-comment code
state line-comment comment
char "\n" code
eat this comment
state zero numeric
char 0-9 decimal
char xX hex
char . float
noeat check-suffix
state decimal numeric
char 0-9 this
char eE exponent
char . float
noeat check-suffix
state hex numeric
char 0-9a-fA-F this
noeat check-suffix
state float numeric
char 0-9 this
char eE exponent
noeat check-suffix
state exponent numeric
char +- exponent-digit
char 0-9 exponent-digit
noeat check-suffix
state exponent-digit numeric
char 0-9 this
noeat check-suffix
state check-suffix error
char a-zA-Z0-9_ this
noeat code
state dot
char 0-9 dot-float
noeat code
state dot-float
recolor numeric 2
noeat float
state identifier
char -b a-zA-Z0-9_ this
inlist keyword code
inlist constant code
inlist opword code operator
noeat code
state single-quote string
char \' code string
char "\n" code
char "\\" .lua-escape:this special
eat this
state double-quote string
char \" code string
char "\n" code
char "\\" .lua-escape:this special
eat this
|