Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/lua.xml
Show All 37 Lines | 6 | <!-- | |||
---|---|---|---|---|---|
38 | - based on Lua 5.0.2 syntax | 38 | - based on Lua 5.0.2 syntax | ||
39 | - strings "[[ ]]" and single quoted strings | 39 | - strings "[[ ]]" and single quoted strings | ||
40 | - block comments | 40 | - block comments | ||
41 | - function, if/elseif/else, do-end chunks, comment blocks, strings using [[ ]] collapsable | 41 | - function, if/elseif/else, do-end chunks, comment blocks, strings using [[ ]] collapsable | ||
42 | - nil, false and true consided pseudo-variables (displayed as numbers) | 42 | - nil, false and true consided pseudo-variables (displayed as numbers) | ||
43 | - NOTE, FIXME, TODO alerts added on comments | 43 | - NOTE, FIXME, TODO alerts added on comments | ||
44 | - improved highlighting | 44 | - improved highlighting | ||
45 | --> | 45 | --> | ||
46 | <language name="Lua" version="3" indenter="lua" kateversion="5.0" section="Scripts" extensions="*.lua" mimetype="text/x-lua"> | 46 | <language name="Lua" version="4" indenter="lua" kateversion="5.0" section="Scripts" extensions="*.lua" mimetype="text/x-lua"> | ||
47 | <highlighting> | 47 | <highlighting> | ||
48 | <list name="keywords"> | 48 | <list name="keywords"> | ||
49 | <item>and</item> | 49 | <item>and</item> | ||
50 | <item>function</item> | 50 | <item>function</item> | ||
51 | <item>in</item> | 51 | <item>in</item> | ||
52 | <item>local</item> | 52 | <item>local</item> | ||
53 | <item>not</item> | 53 | <item>not</item> | ||
54 | <item>or</item> | 54 | <item>or</item> | ||
▲ Show 20 Lines • Show All 430 Lines • ▼ Show 20 Line(s) | 436 | <contexts> | |||
485 | </context> | 485 | </context> | ||
486 | 486 | | |||
487 | <context name="String_double" attribute="Strings" lineEndContext="Error"> | 487 | <context name="String_double" attribute="Strings" lineEndContext="Error"> | ||
488 | <DetectChar attribute="Strings" context="Special_char" char="\" lookAhead="true"/> | 488 | <DetectChar attribute="Strings" context="Special_char" char="\" lookAhead="true"/> | ||
489 | <DetectChar attribute="Strings" context="#pop" char="""/> | 489 | <DetectChar attribute="Strings" context="#pop" char="""/> | ||
490 | </context> | 490 | </context> | ||
491 | 491 | | |||
492 | <context name="Special_char" attribute="Error" lineEndContext="#pop"> | 492 | <context name="Special_char" attribute="Error" lineEndContext="#pop"> | ||
493 | <RegExpr attribute="Special Char" context="#pop" String="\\(?:[abfnrtvz'"\\\[\]]|x&HEX;&HEX;|\d{1,3}|u\{&HEX;{1,6}\})" /> | 493 | <LineContinue attribute="Special Char" context="#pop" /> | ||
494 | <Detect2Chars attribute="Special Char" context="Special_char_\z" char="\" char1="z" lookAhead="true"/> | ||||
495 | <RegExpr attribute="Special Char" context="#pop" String="\\(?:[abfnrtv'"\\\[\]]|x&HEX;&HEX;|\d{1,3}|u\{&HEX;{1,6}\})"/> | ||||
494 | <DetectChar attribute="Error" context="#pop" char="\"/> | 496 | <DetectChar attribute="Error" context="#pop" char="\"/> | ||
495 | </context> | 497 | </context> | ||
496 | 498 | | |||
499 | <context name="Special_char_\z" attribute="Special Char" lineEndContext="#stay"> | ||||
500 | <LineContinue attribute="Special Char" context="#pop#pop" char="z"/> | ||||
501 | <DetectChar attribute="Special Char" context="#pop#pop" char="z"/> | ||||
502 | </context> | ||||
503 | | ||||
497 | <context name="String_block" attribute="RawStrings" lineEndContext="#stay" dynamic="true"> | 504 | <context name="String_block" attribute="RawStrings" lineEndContext="#stay" dynamic="true"> | ||
498 | <StringDetect attribute="RawStrings" context="#pop" String="]%1]" dynamic="true" /> | 505 | <StringDetect attribute="RawStrings" context="#pop" String="]%1]" dynamic="true" /> | ||
499 | </context> | 506 | </context> | ||
500 | 507 | | |||
501 | <context name="Error" attribute="Error" lineEndContext="#stay"> | 508 | <context name="Error" attribute="Error" lineEndContext="#stay"> | ||
502 | </context> | 509 | </context> | ||
503 | </contexts> | 510 | </contexts> | ||
504 | 511 | | |||
Show All 27 Lines |