File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
swift/ql/lib/codeql/swift/elements Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,32 @@ class Comment extends CommentBase {
44 /** toString */
55 override string toString ( ) { result = getText ( ) }
66}
7+
8+ class SingleLineComment extends Comment {
9+ SingleLineComment ( ) {
10+ this .getText ( ) .matches ( "//%" ) and
11+ not this instanceof SingleLineDocComment
12+ }
13+ }
14+
15+ class MultiLineComment extends Comment {
16+ MultiLineComment ( ) {
17+ this .getText ( ) .matches ( "/*%" ) and
18+ not this instanceof MultiLineDocComment
19+ }
20+ }
21+
22+ class DocComment extends Comment {
23+ DocComment ( ) {
24+ this instanceof SingleLineDocComment or
25+ this instanceof MultiLineDocComment
26+ }
27+ }
28+
29+ class SingleLineDocComment extends Comment {
30+ SingleLineDocComment ( ) { this .getText ( ) .matches ( "///%" ) }
31+ }
32+
33+ class MultiLineDocComment extends Comment {
34+ MultiLineDocComment ( ) { this .getText ( ) .matches ( "/**%" ) }
35+ }
You can’t perform that action at this time.
0 commit comments