Files
codeql/csharp/ql/test/library-tests/comments/Comments.ql
2021-01-22 15:00:45 +01:00

27 lines
720 B
Plaintext

import csharp
private predicate commentLine(
CommentBlock c, CommentLine l, int numLines, string text, string rawText
) {
l.getParent() = c and
numLines = c.getNumLines() and
text = l.getText() and
rawText = l.getRawText()
}
query predicate singlelineComment(
CommentBlock c, SinglelineComment l, int numLines, string text, string rawText
) {
commentLine(c, l, numLines, text, rawText)
}
query predicate multilineComment(
CommentBlock c, MultilineComment l, int numLines, string text, string rawText
) {
commentLine(c, l, numLines, text, rawText)
}
query predicate xmlComment(CommentBlock c, XmlComment l, int numLines, string text, string rawText) {
commentLine(c, l, numLines, text, rawText)
}