Skip to content

Commit 72f9e34

Browse files
authored
Merge pull request #20708 from github/tausbn/python-add-support-for-template-string-literals
Python: Add support for template string literals
2 parents 4ede207 + 6b03130 commit 72f9e34

File tree

27 files changed

+45582
-38500
lines changed

27 files changed

+45582
-38500
lines changed

python/downgrades/8d257a4a9bc78e39856d6cd33499389fc5148d4f/old.dbscheme

Lines changed: 1282 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// We must wrap the DB types, as these cannot appear in argument lists
2+
class Expr_ extends @py_expr {
3+
string toString() { result = "Expr" }
4+
}
5+
6+
class ExprParent_ extends @py_expr_parent {
7+
string toString() { result = "ExprList" }
8+
}
9+
10+
query predicate py_exprs_without_template_strings(Expr_ id, int kind, ExprParent_ parent, int idx) {
11+
py_exprs(id, kind, parent, idx) and
12+
// From the dbscheme:
13+
//
14+
// case @py_expr.kind of
15+
// ...
16+
// | 39 = @py_SpecialOperation
17+
// | 40 = @py_TemplateString
18+
// | 41 = @py_JoinedTemplateString
19+
// | 42 = @py_TemplateStringPart;
20+
not kind in [40, 41, 42]
21+
}

0 commit comments

Comments
 (0)