Synopsis - Cross-Reference
File: /tests/Parsers/Cxx/expected/comment_proximity.xml1<?xml version='1.0' encoding='ISO-8859-1'?> 2<ast> 3 <declarations> 4 <instance accessibility="0" class="Synopsis.AST.Variable" constr="0" file="Parsers/Cxx/input/comment_proximity.cc" language="C++" line="3" name="test1" type="global variable"> 5 <comments> 6 <instance class="Synopsis.AST.Comment" file="Parsers/Cxx/input/comment_proximity.cc" line="1" suspect="1"> 7 <text> 8 // Comment at start 9 10 </text> 11 </instance> 12 </comments> 13 <vtype> 14 <instance class="Synopsis.Type.Base" language="C++" name="int"/> 15 </vtype> 16 </instance> 17 <instance accessibility="0" class="Synopsis.AST.Variable" constr="0" file="Parsers/Cxx/input/comment_proximity.cc" language="C++" line="7" name="test2" type="global variable"> 18 <comments> 19 <instance class="Synopsis.AST.Comment" file="Parsers/Cxx/input/comment_proximity.cc" line="5" suspect="0"> 20 <text> 21 // Test2: This should have a comment, unlike test1 22// It should also have two lines 23 24 </text> 25 </instance> 26 </comments> 27 <vtype/> 28 </instance> 29 <instance accessibility="0" class="Synopsis.AST.Variable" constr="0" file="Parsers/Cxx/input/comment_proximity.cc" language="C++" line="12" name="test3" type="global variable"> 30 <comments> 31 <instance class="Synopsis.AST.Comment" file="Parsers/Cxx/input/comment_proximity.cc" line="9" suspect="1"> 32 <text> 33 /* A comment by itself 34 * Over multiple lines. */ 35 36 </text> 37 </instance> 38 </comments> 39 <vtype/> 40 </instance> 41 <instance accessibility="0" class="Synopsis.AST.Variable" constr="0" file="Parsers/Cxx/input/comment_proximity.cc" language="C++" line="18" name="test4" type="global variable"> 42 <comments> 43 <instance class="Synopsis.AST.Comment" file="Parsers/Cxx/input/comment_proximity.cc" line="14" suspect="1"> 44 <text> 45 /* This comment should be ignored. 46 */ 47 48 </text> 49 </instance> 50 <instance class="Synopsis.AST.Comment" file="Parsers/Cxx/input/comment_proximity.cc" line="16" suspect="0"> 51 <text> 52 /* Test4: Should have a comment 53 * */ 54 55 </text> 56 </instance> 57 </comments> 58 <vtype/> 59 </instance> 60 <instance accessibility="0" class="Synopsis.AST.Variable" constr="0" file="Parsers/Cxx/input/comment_proximity.cc" language="C++" line="23" name="test5" type="global variable"> 61 <comments> 62 <instance class="Synopsis.AST.Comment" file="Parsers/Cxx/input/comment_proximity.cc" line="20" suspect="0"> 63 <text> 64 /* Test5: This should have a comment, unlike test 3 65 * Which had a gap. 66 */ 67 68 </text> 69 </instance> 70 </comments> 71 <vtype/> 72 </instance> 73 <instance accessibility="0" class="Synopsis.AST.Builtin" file="Parsers/Cxx/input/comment_proximity.cc" language="C++" line="24" name="EOS" type="EOS"> 74 <comments> 75 <instance class="Synopsis.AST.Comment" file="Parsers/Cxx/input/comment_proximity.cc" line="24" suspect="1"> 76 <text> 77 //< This should still be tail-appended! 78 79 </text> 80 </instance> 81 </comments> 82 </instance> 83 </declarations> 84 <types> 85 <instance class="Synopsis.Type.Declared" language="C++" name="EOS"> 86 <declaration/> 87 </instance> 88 <instance class="Synopsis.Type.Declared" language="C++" name="test1"> 89 <declaration/> 90 </instance> 91 <instance class="Synopsis.Type.Declared" language="C++" name="test2"> 92 <declaration/> 93 </instance> 94 <instance class="Synopsis.Type.Declared" language="C++" name="test3"> 95 <declaration/> 96 </instance> 97 <instance class="Synopsis.Type.Declared" language="C++" name="test4"> 98 <declaration/> 99 </instance> 100 <instance class="Synopsis.Type.Declared" language="C++" name="test5"> 101 <declaration/> 102 </instance> 103 </types> 104 <files> 105 <instance class="Synopsis.AST.SourceFile" filename="Parsers/Cxx/input/comment_proximity.cc" is_main="1" language="C++"> 106 <declarations/> 107 <macro_calls/> 108 </instance> 109 </files> 110</ast>