Skip to content

Commit c842ae4

Browse files
committed
Swift: make node properties consistent with other languages
1 parent e3e9774 commit c842ae4

File tree

2 files changed

+412
-414
lines changed

2 files changed

+412
-414
lines changed

swift/ql/lib/codeql/swift/printast/PrintAstNode.qll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ class PrintUnresolved extends PrintLocatable {
122122
class PrintVarDecl extends PrintLocatable {
123123
override VarDecl ast;
124124

125-
override string getProperty(string key) {
126-
key = "getType()" and result = ast.getType().toString()
127-
}
125+
override string getProperty(string key) { key = "Type" and result = ast.getType().toString() }
128126
}
129127

130128
/**
@@ -134,6 +132,6 @@ class PrintAbstractFunctionDecl extends PrintLocatable {
134132
override AbstractFunctionDecl ast;
135133

136134
override string getProperty(string key) {
137-
key = "getInterfaceType()" and result = ast.getInterfaceType().toString()
135+
key = "InterfaceType" and result = ast.getInterfaceType().toString()
138136
}
139137
}

0 commit comments

Comments
 (0)