Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/wml.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd"> | 2 | <!DOCTYPE language SYSTEM "language.dtd"> | ||
3 | <!-- | 3 | <!-- | ||
4 | Thread for discussions: http://www.wesnoth.org/forum/viewtopic.php?f=21&t=13781 | 4 | Thread for discussions: http://www.wesnoth.org/forum/viewtopic.php?f=21&t=13781 | ||
5 | Alternatively try the "normal" way: #kate@freenode, kwrite-devel@kde.org | 5 | Alternatively try the "normal" way: #kate@freenode, kwrite-devel@kde.org | ||
6 | Changelog (0.35 and later): | 6 | Changelog (0.35 and later): | ||
7 | *************************** | 7 | *************************** | ||
8 | * 4 | ||||
9 | - 2018-12-31 <nibgonz@gmail.com> | ||||
10 | * Fix infinite loop between the "section" & "error" contexts. | ||||
11 | * Only highlight tags with valid names. | ||||
8 | * 0.42 | 12 | * 0.42 | ||
9 | - 2011-11-15 <shadowm2006@gmail.com>: | 13 | - 2011-11-15 <shadowm2006@gmail.com>: | ||
10 | * Added preprocessor directives: #error, #warning | 14 | * Added preprocessor directives: #error, #warning | ||
11 | * Added highlighting for the wmlxgettext annotation metadirective (po:) | 15 | * Added highlighting for the wmlxgettext annotation metadirective (po:) | ||
12 | * 0.41 | 16 | * 0.41 | ||
13 | - 2011-04-15 <shadowm2006@gmail.com>: | 17 | - 2011-04-15 <shadowm2006@gmail.com>: | ||
14 | * Added preprocessor directives: #if(n)have, #if(n)ver | 18 | * Added preprocessor directives: #if(n)have, #if(n)ver | ||
15 | * Revalidated against language.dtd | 19 | * Revalidated against language.dtd | ||
Show All 33 Lines | 52 | - 2008-01-?? <shadowm2006@gmail.com>: | |||
49 | * Made #textdomain another preprocessor directive, as is handled by the game at /src/serialization/preprocessor.cpp | 53 | * Made #textdomain another preprocessor directive, as is handled by the game at /src/serialization/preprocessor.cpp | ||
50 | line 634 and around | 54 | line 634 and around | ||
51 | - 2007-11-?? <shadowm2006@gmail.com>: | 55 | - 2007-11-?? <shadowm2006@gmail.com>: | ||
52 | * Minor improvements? | 56 | * Minor improvements? | ||
53 | - 2007-11-?? <shadowm2006@gmail.com>: | 57 | - 2007-11-?? <shadowm2006@gmail.com>: | ||
54 | * Made the new #ifndef directive be recognized (implemented on Wesnoth 1.3.11 and later) | 58 | * Made the new #ifndef directive be recognized (implemented on Wesnoth 1.3.11 and later) | ||
55 | --> | 59 | --> | ||
56 | 60 | | |||
57 | <language name="Wesnoth Markup Language" section="Markup" extensions="*.cfg;*.pbl;*.CFG;*.PBL" version="3" | 61 | <language name="Wesnoth Markup Language" section="Markup" extensions="*.cfg;*.pbl;*.CFG;*.PBL" version="4" | ||
58 | kateversion="2.3" casesensitive="true" author="Zachary Palmer (zep01@bahj.com), modif. by Ignacio Riquelme Morelle (shadowm2006@gmail.com) and Jonathan Schmidt-Dominé (devel@the-user.org)" license="GPL"> | 62 | kateversion="2.3" casesensitive="true" author="Zachary Palmer (zep01@bahj.com), modif. by Ignacio Riquelme Morelle (shadowm2006@gmail.com) and Jonathan Schmidt-Dominé (devel@the-user.org)" license="GPL"> | ||
59 | <highlighting> | 63 | <highlighting> | ||
60 | <list name="alerts_wml_utils"> | 64 | <list name="alerts_wml_utils"> | ||
61 | <item>wmllint</item> | 65 | <item>wmllint</item> | ||
62 | <item>wmlindent</item> | 66 | <item>wmlindent</item> | ||
63 | <item>wmlscope</item> | 67 | <item>wmlscope</item> | ||
64 | <item>po</item> | 68 | <item>po</item> | ||
65 | </list> | 69 | </list> | ||
Show All 28 Lines | 92 | <context attribute="Normal WML Text" name="text" lineEndContext="#stay"> | |||
94 | <keyword String="preprocessor_block_begin_statements" attribute="Preprocessor" context="preprocessor" beginRegion="wmlpp_block" /> | 98 | <keyword String="preprocessor_block_begin_statements" attribute="Preprocessor" context="preprocessor" beginRegion="wmlpp_block" /> | ||
95 | <keyword String="preprocessor_block_end_statements" attribute="Preprocessor" context="preprocessor" endRegion="wmlpp_block" /> | 99 | <keyword String="preprocessor_block_end_statements" attribute="Preprocessor" context="preprocessor" endRegion="wmlpp_block" /> | ||
96 | 100 | | |||
97 | <DetectChar char="#" attribute="Comment" context="comment" /> | 101 | <DetectChar char="#" attribute="Comment" context="comment" /> | ||
98 | 102 | | |||
99 | <DetectChar char="{" attribute="Macro/Include" context="macro" beginRegion="macro_block" /> | 103 | <DetectChar char="{" attribute="Macro/Include" context="macro" beginRegion="macro_block" /> | ||
100 | 104 | | |||
101 | <!--<DetectChar char="[" attribute="WML Node" context="section" firstNonSpace="true" />--> | 105 | <!--<DetectChar char="[" attribute="WML Node" context="section" firstNonSpace="true" />--> | ||
102 | <RegExpr String="\[(?!/)" attribute="WML Node" context="section" beginRegion="wml_node" /> | 106 | <!--<RegExpr String="\[(?!/)" attribute="WML Node" context="section" beginRegion="wml_node" /> | ||
103 | <Detect2Chars char="[" char1="/" attribute="WML Node" context="section" endRegion="wml_node" /> | 107 | <Detect2Chars char="[" char1="/" attribute="WML Node" context="section" endRegion="wml_node" />--> | ||
108 | <RegExpr String="\[/\s*\w*\s*\]" attribute="WML Node" context="#stay" endRegion="wml_node" /> | ||||
109 | <RegExpr String="\[\w*\]" attribute="WML Node" context="#stay" beginRegion="wml_node" /> | ||||
104 | 110 | | |||
105 | <RegExpr String="(\w|,| )+=" attribute="WML Attribute" context="value" | 111 | <RegExpr String="(\w|,| )+=" attribute="WML Attribute" context="value" | ||
106 | lookAhead="true" /> | 112 | lookAhead="true" /> | ||
107 | 113 | | |||
108 | <IncludeRules context="variableSubstitutionRule" /> | 114 | <IncludeRules context="variableSubstitutionRule" /> | ||
109 | </context> | 115 | </context> | ||
110 | 116 | | |||
111 | <context attribute="String" lineEndContext="#stay" name="string"> | 117 | <context attribute="String" lineEndContext="#stay" name="string"> | ||
Show All 35 Lines | |||||
147 | </context> | 153 | </context> | ||
148 | 154 | | |||
149 | <context attribute="Macro String" lineEndContext="#stay" name="macroString2"> | 155 | <context attribute="Macro String" lineEndContext="#stay" name="macroString2"> | ||
150 | <DetectChar char=")" attribute="Macro String" context="#pop" endRegion="macro_paren_string" /> | 156 | <DetectChar char=")" attribute="Macro String" context="#pop" endRegion="macro_paren_string" /> | ||
151 | <DetectChar char="{" attribute="Macro/Include" context="macro" beginRegion="macro_block" /> | 157 | <DetectChar char="{" attribute="Macro/Include" context="macro" beginRegion="macro_block" /> | ||
152 | <IncludeRules context="text" /> | 158 | <IncludeRules context="text" /> | ||
153 | </context> | 159 | </context> | ||
154 | 160 | | |||
155 | <context attribute="WML Node" lineEndContext="error" name="section"> | 161 | <!--<context attribute="WML Node" lineEndContext="error" name="section"> | ||
156 | <DetectChar char="]" attribute="WML Node" context="#pop" /> | 162 | <DetectChar char="]" attribute="WML Node" context="#pop" /> | ||
157 | </context> | 163 | </context>--> | ||
158 | 164 | | |||
159 | <context attribute="WML Attribute" lineEndContext="#pop" name="value"> | 165 | <context attribute="WML Attribute" lineEndContext="#pop" name="value"> | ||
160 | <DetectChar char="=" attribute="Normal WML Text" context="#pop" /> | 166 | <DetectChar char="=" attribute="Normal WML Text" context="#pop" /> | ||
161 | </context> | 167 | </context> | ||
162 | 168 | | |||
163 | <context attribute="Preprocessor" lineEndContext="#pop" name="preprocessor"> | 169 | <context attribute="Preprocessor" lineEndContext="#pop" name="preprocessor"> | ||
164 | </context> | 170 | </context> | ||
165 | 171 | | |||
166 | <context attribute="Error" lineEndContext="#pop" name="error"> | 172 | <context attribute="Error" lineEndContext="#stay" name="error"> | ||
167 | </context> | 173 | </context> | ||
168 | 174 | | |||
169 | <context attribute="Variable Substitution" lineEndContext="#pop" | 175 | <context attribute="Variable Substitution" lineEndContext="#pop" | ||
170 | name="variableSubstitution"> | 176 | name="variableSubstitution"> | ||
171 | <DetectChar char="|" attribute="Variable Substitution" context="#pop" /> | 177 | <DetectChar char="|" attribute="Variable Substitution" context="#pop" /> | ||
172 | <DetectChar char="$" attribute="Variable Substitution" context="variableSubstitution" /> | 178 | <DetectChar char="$" attribute="Variable Substitution" context="variableSubstitution" /> | ||
173 | <DetectChar char="[" attribute="Variable Subscript" context="variableSubscript" /> | 179 | <DetectChar char="[" attribute="Variable Subscript" context="variableSubscript" /> | ||
174 | <RegExpr String="[^A-Za-z0-9_\.]" attribute="Variable Substitution" context="#pop" | 180 | <RegExpr String="[^A-Za-z0-9_\.]" attribute="Variable Substitution" context="#pop" | ||
Show All 35 Lines |