Skip to content

Commit 2cda1a2

Browse files
committed
C#: Add language specific part of the models as data inline expectation.
1 parent 78b8a92 commit 2cda1a2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
private import csharp as Cs
2+
private import codeql.mad.test.InlineMadTest
3+
4+
private module InlineMadTestLang implements InlineMadTestLangSig {
5+
class Callable = Cs::Callable;
6+
7+
string getComment(Callable c) {
8+
exists(Cs::CommentBlock block, Cs::Element after | after = block.getAfter() |
9+
(
10+
after = c or
11+
after = c.(Cs::Accessor).getDeclaration()
12+
) and
13+
result = block.getALine()
14+
)
15+
}
16+
}
17+
18+
import InlineMadTestImpl<InlineMadTestLang>

0 commit comments

Comments
 (0)