Syntax Highlighting In QtCreator

This commit is contained in:
TheBrokenRail 2024-01-14 04:02:01 -05:00
parent 63ad20456c
commit 371a18b1e5
2 changed files with 55 additions and 1 deletions

View File

@ -76,7 +76,7 @@ export function assertSize(name: string, size: number, isDefined: boolean) {
out += `#define ${macro} ${toHex(size)}\n`;
// Check Size
out += `${getAssertFunction()}(sizeof (${name}) == ${macro}, "Invalid Size");\n`;
// Hide Structure Size Of The Real Size Is Unknown
// Hide Structure Size If The Real Size Is Unknown
if (!isDefined) {
out += `#undef ${macro}\n`;
}

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<language name="Symbol Definitions" version="1" kateversion="5.62" section="Sources" extensions="*.def" license="MIT">
<highlighting>
<list name="commands">
<item>extends</item>
<item>size</item>
<item>vtable-size</item>
<item>vtable</item>
<item>property</item>
<item>static-property</item>
<item>static-property-array</item>
<item>method</item>
<item>virtual-method</item>
<item>static-method</item>
<item>constructor</item>
</list>
<list name="types">
<item>char</item>
<item>uchar</item>
<item>int</item>
<item>uint</item>
<item>float</item>
<item>bool</item>
<item>void</item>
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal Text" >
<Detect2Chars attribute="Comment" context="Comment" char="/" char1="/" lookAhead="true" />
<keyword attribute="Keyword" context="#stay" String="commands" />
<keyword attribute="Data Type" context="#stay" String="types" />
<AnyChar attribute="Symbol" context="#stay" String="=;"/>
<HlCHex attribute="Number" context="#stay" />
<Int attribute="Number" context="#stay" />
</context>
<context attribute="Comment" lineEndContext="#pop" name="Comment">
<IncludeRules context="##Comments" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
<itemData name="Keyword" defStyleNum="dsKeyword" />
<itemData name="Data Type" defStyleNum="dsDataType" />
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Symbol" defStyleNum="dsOperator"/>
<itemData name="Number" defStyleNum="dsBaseN" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="//"/>
</comments>
<keywords casesensitive="1" weakDeliminator="-" />
</general>
</language>