File tree Expand file tree Collapse file tree 4 files changed +431
-1
lines changed
lib/codeql/swift/elements Expand file tree Collapse file tree 4 files changed +431
-1
lines changed Original file line number Diff line number Diff line change 392392 " python/ql/test/TestUtilities/InlineExpectationsTest.qll" ,
393393 " ruby/ql/test/TestUtilities/InlineExpectationsTest.qll" ,
394394 " ql/ql/test/TestUtilities/InlineExpectationsTest.qll" ,
395- " go/ql/test/TestUtilities/InlineExpectationsTest.qll"
395+ " go/ql/test/TestUtilities/InlineExpectationsTest.qll" ,
396+ " swift/ql/test/TestUtilities/InlineExpectationsTest.qll"
396397 ],
397398 "C++ ExternalAPIs" : [
398399 " cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll" ,
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