Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System;

public class MyConstStringInterpolationClass
{
public const string hello = "Hello";
public const string helloWorld = $"{hello} World";
public const string reallyHelloWorld = $"Really {helloWorld}";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
inserts
| ConstInterpolatedString.cs:6:38:6:53 | $"..." | ConstInterpolatedString.cs:6:41:6:45 | access to constant hello |
| ConstInterpolatedString.cs:7:44:7:65 | $"..." | ConstInterpolatedString.cs:7:54:7:63 | access to constant helloWorld |
texts
| ConstInterpolatedString.cs:6:38:6:53 | $"..." | ConstInterpolatedString.cs:6:47:6:52 | " World" |
| ConstInterpolatedString.cs:7:44:7:65 | $"..." | ConstInterpolatedString.cs:7:46:7:52 | "Really " |
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import csharp

query predicate inserts(InterpolatedStringExpr expr, Expr e) { expr.getAnInsert() = e }

query predicate texts(InterpolatedStringExpr expr, StringLiteral literal) {
expr.getAText() = literal
}