Files
codeql/powershell/ql/lib/semmle/code/powershell/CommentEntity.qll
2024-09-23 16:27:36 +01:00

18 lines
514 B
Plaintext

import powershell
class Comment extends @comment_entity {
Location getLocation() { comment_entity_location(this, result) }
StringLiteral getCommentContents() { comment_entity(this, result) }
string toString() { result = this.getCommentContents().toString() }
}
class SingleLineComment extends Comment {
SingleLineComment() { this.getCommentContents().getNumContinuations() = 1 }
}
class MultiLineComment extends Comment {
MultiLineComment() { this.getCommentContents().getNumContinuations() > 1 }
}