@@ -156,28 +156,42 @@ class TopLevel extends TTopLevel, AstNode {
156156 override QLDoc getQLDoc ( ) { result = this .getMember ( 0 ) }
157157}
158158
159- class QLDoc extends TQLDoc , AstNode {
159+ abstract class Comment extends AstNode , TComment {
160+ abstract string getContents ( ) ;
161+ }
162+
163+ class QLDoc extends TQLDoc , Comment {
160164 QL:: Qldoc qldoc ;
161165
162166 QLDoc ( ) { this = TQLDoc ( qldoc ) }
163167
164- string getContents ( ) { result = qldoc .getValue ( ) }
168+ override string getContents ( ) { result = qldoc .getValue ( ) }
165169
166170 override string getAPrimaryQlClass ( ) { result = "QLDoc" }
167171
168172 override AstNode getParent ( ) { result .getQLDoc ( ) = this }
169173}
170174
171- class BlockComment extends TBlockComment , AstNode {
175+ class BlockComment extends TBlockComment , Comment {
172176 QL:: BlockComment comment ;
173177
174178 BlockComment ( ) { this = TBlockComment ( comment ) }
175179
176- string getContents ( ) { result = comment .getValue ( ) }
180+ override string getContents ( ) { result = comment .getValue ( ) }
177181
178182 override string getAPrimaryQlClass ( ) { result = "BlockComment" }
179183}
180184
185+ class LineComment extends TLineComment , Comment {
186+ QL:: LineComment comment ;
187+
188+ LineComment ( ) { this = TLineComment ( comment ) }
189+
190+ override string getContents ( ) { result = comment .getValue ( ) }
191+
192+ override string getAPrimaryQlClass ( ) { result = "LineComment" }
193+ }
194+
181195/**
182196 * The `from, where, select` part of a QL query.
183197 */
0 commit comments