forked from JACoders/OpenJK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VS Debugger Visualization for Parser
- Loading branch information
Showing
1 changed file
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- This file tells the Visual Studio Debugger how to display types. --> | ||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | ||
|
||
<Type Name="gsl::array_view<*>"> | ||
<DisplayString>{{ {begin_,[end_ - begin_]} }}</DisplayString> | ||
<DisplayString>{begin_,[end_ - begin_]s}</DisplayString> | ||
<Expand> | ||
<ArrayItems> | ||
<Size>end_ - begin_</Size> | ||
<ValuePointer>begin_</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Type> | ||
|
||
<Type Name="FS::FileBuffer"> | ||
<DisplayString Condition="_buffer == nullptr">{{ Empty File Buffer }}</DisplayString> | ||
<DisplayString Condition="_buffer != nullptr">{{ {_size} Byte File Buffer }}</DisplayString> | ||
</Type> | ||
|
||
<!-- Generic Parser 2 --> | ||
|
||
<Type Name="CGenericParser2"> | ||
<DisplayString>Generic Parser</DisplayString> | ||
<Expand> | ||
<Item Name="Content">mFileContent</Item> | ||
<Item Name="Root Group">mTopLevel</Item> | ||
</Expand> | ||
</Type> | ||
<Type Name="CGPGroup"> | ||
<DisplayString>{{ GP Group {mName}, {mProperties._Mypair._Myval2._Mylast - mProperties._Mypair._Myval2._Myfirst} Properties, {mSubGroups._Mypair._Myval2._Mylast - mSubGroups._Mypair._Myval2._Myfirst} Sub-Groups }}</DisplayString> | ||
<Expand> | ||
<Item Name="Properties">mProperties</Item> | ||
<Item Name="Sub-Groups">mSubGroups</Item> | ||
</Expand> | ||
</Type> | ||
<Type Name="CGPProperty"> | ||
<!-- this is for the VS2015 STL --> | ||
<DisplayString Condition="mValues._Mypair._Myval2._Mylast - mValues._Mypair._Myval2._Myfirst == 1">{{ {mKey} = {mValues[0]} }}</DisplayString> | ||
<DisplayString Condition="mValues._Mypair._Myval2._Mylast - mValues._Mypair._Myval2._Myfirst != 1">{{ {mKey} = {mValues} }}</DisplayString> | ||
</Type> | ||
|
||
</AutoVisualizer> |