Skip to content

Commit b65f49b

Browse files
committed
Swift: document introducer_int
1 parent 7b181a2 commit b65f49b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

swift/codegen/generators/qlgen.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class NoClasses(Error):
6262
"decl": "declaration",
6363
"repr": "representation",
6464
"param": "parameter",
65+
"int": "integer",
6566
}
6667

6768
abbreviations.update({f"{k}s": f"{v}s" for k, v in abbreviations.items()})

swift/ql/lib/codeql/swift/generated/decl/ConcreteVarDecl.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ module Generated {
88
override string getAPrimaryQlClass() { result = "ConcreteVarDecl" }
99

1010
/**
11-
* Gets the introducer int of this concrete var declaration.
11+
* Gets the introducer enumeration value.
12+
* This is 0 if the variable was introduced with `let` and 1 if it was introduced with `var`.
1213
*/
1314
int getIntroducerInt() {
1415
result = Synth::convertConcreteVarDeclToRaw(this).(Raw::ConcreteVarDecl).getIntroducerInt()

swift/schema.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ class ConcreteFuncDecl(FuncDecl):
200200
pass
201201

202202
class ConcreteVarDecl(VarDecl):
203-
introducer_int: int
203+
introducer_int: int | doc("introducer enumeration value") | desc("""
204+
This is 0 if the variable was introduced with `let` and 1 if it was introduced with `var`.
205+
""")
204206

205207
class GenericTypeParamDecl(AbstractTypeParamDecl):
206208
pass

0 commit comments

Comments
 (0)