Swift: add var to the list of doc expanded abbreviations

This commit is contained in:
Paolo Tranquilli
2022-11-11 12:00:12 +01:00
parent 85233b3cbf
commit fc98fd3094
4 changed files with 24 additions and 23 deletions

View File

@@ -63,6 +63,7 @@ abbreviations = {
"repr": "representation",
"param": "parameter",
"int": "integer",
"var": "variable",
}
abbreviations.update({f"{k}s": f"{v}s" for k, v in abbreviations.items()})

View File

@@ -14,7 +14,7 @@ module Generated {
predicate isInout() { Synth::convertParamDeclToRaw(this).(Raw::ParamDecl).isInout() }
/**
* Gets the property wrapper local wrapped var binding of this parameter declaration, if it exists.
* Gets the property wrapper local wrapped variable binding of this parameter declaration, if it exists.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -27,7 +27,7 @@ module Generated {
}
/**
* Gets the property wrapper local wrapped var binding of this parameter declaration, if it exists.
* Gets the property wrapper local wrapped variable binding of this parameter declaration, if it exists.
*
* This is the synthesized binding introducing the property wrapper local wrapped projection
* variable for this variable, if any.
@@ -44,7 +44,7 @@ module Generated {
}
/**
* Gets the property wrapper local wrapped var of this parameter declaration, if it exists.
* Gets the property wrapper local wrapped variable of this parameter declaration, if it exists.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -57,7 +57,7 @@ module Generated {
}
/**
* Gets the property wrapper local wrapped var of this parameter declaration, if it exists.
* Gets the property wrapper local wrapped variable of this parameter declaration, if it exists.
*
* This is the synthesized local wrapped value, shadowing this parameter declaration in case it
* has a property wrapper.

View File

@@ -10,12 +10,12 @@ import codeql.swift.elements.type.Type
module Generated {
class VarDecl extends Synth::TVarDecl, AbstractStorageDecl {
/**
* Gets the name of this var declaration.
* Gets the name of this variable declaration.
*/
string getName() { result = Synth::convertVarDeclToRaw(this).(Raw::VarDecl).getName() }
/**
* Gets the type of this var declaration.
* Gets the type of this variable declaration.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -25,12 +25,12 @@ module Generated {
}
/**
* Gets the type of this var declaration.
* Gets the type of this variable declaration.
*/
final Type getType() { result = getImmediateType().resolve() }
/**
* Gets the attached property wrapper type of this var declaration, if it exists.
* Gets the attached property wrapper type of this variable declaration, if it exists.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -43,7 +43,7 @@ module Generated {
}
/**
* Gets the attached property wrapper type of this var declaration, if it exists.
* Gets the attached property wrapper type of this variable declaration, if it exists.
*/
final Type getAttachedPropertyWrapperType() {
result = getImmediateAttachedPropertyWrapperType().resolve()
@@ -55,7 +55,7 @@ module Generated {
final predicate hasAttachedPropertyWrapperType() { exists(getAttachedPropertyWrapperType()) }
/**
* Gets the parent pattern of this var declaration, if it exists.
* Gets the parent pattern of this variable declaration, if it exists.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -68,7 +68,7 @@ module Generated {
}
/**
* Gets the parent pattern of this var declaration, if it exists.
* Gets the parent pattern of this variable declaration, if it exists.
*/
final Pattern getParentPattern() { result = getImmediateParentPattern().resolve() }
@@ -78,7 +78,7 @@ module Generated {
final predicate hasParentPattern() { exists(getParentPattern()) }
/**
* Gets the parent initializer of this var declaration, if it exists.
* Gets the parent initializer of this variable declaration, if it exists.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -91,7 +91,7 @@ module Generated {
}
/**
* Gets the parent initializer of this var declaration, if it exists.
* Gets the parent initializer of this variable declaration, if it exists.
*/
final Expr getParentInitializer() { result = getImmediateParentInitializer().resolve() }
@@ -101,7 +101,7 @@ module Generated {
final predicate hasParentInitializer() { exists(getParentInitializer()) }
/**
* Gets the property wrapper backing var binding of this var declaration, if it exists.
* Gets the property wrapper backing variable binding of this variable declaration, if it exists.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -114,7 +114,7 @@ module Generated {
}
/**
* Gets the property wrapper backing var binding of this var declaration, if it exists.
* Gets the property wrapper backing variable binding of this variable declaration, if it exists.
*
* This is the synthesized binding introducing the property wrapper backing variable for this
* variable, if any.
@@ -131,7 +131,7 @@ module Generated {
}
/**
* Gets the property wrapper backing var of this var declaration, if it exists.
* Gets the property wrapper backing variable of this variable declaration, if it exists.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -144,7 +144,7 @@ module Generated {
}
/**
* Gets the property wrapper backing var of this var declaration, if it exists.
* Gets the property wrapper backing variable of this variable declaration, if it exists.
*
* This is the synthesized variable holding the property wrapper for this variable, if any.
*/
@@ -158,7 +158,7 @@ module Generated {
final predicate hasPropertyWrapperBackingVar() { exists(getPropertyWrapperBackingVar()) }
/**
* Gets the property wrapper projection var binding of this var declaration, if it exists.
* Gets the property wrapper projection variable binding of this variable declaration, if it exists.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -171,7 +171,7 @@ module Generated {
}
/**
* Gets the property wrapper projection var binding of this var declaration, if it exists.
* Gets the property wrapper projection variable binding of this variable declaration, if it exists.
*
* This is the synthesized binding introducing the property wrapper projection variable for this
* variable, if any.
@@ -188,7 +188,7 @@ module Generated {
}
/**
* Gets the property wrapper projection var of this var declaration, if it exists.
* Gets the property wrapper projection variable of this variable declaration, if it exists.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -201,7 +201,7 @@ module Generated {
}
/**
* Gets the property wrapper projection var of this var declaration, if it exists.
* Gets the property wrapper projection variable of this variable declaration, if it exists.
*
* If this variable has a property wrapper with a projected value, this is the corresponding
* synthesized variable holding that projected value, accessible with this variable's name

View File

@@ -47,7 +47,7 @@ module Generated {
final BraceStmt getBody() { result = getImmediateBody().resolve() }
/**
* Gets the var of this tap expression.
* Gets the variable of this tap expression.
*
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -58,7 +58,7 @@ module Generated {
}
/**
* Gets the var of this tap expression.
* Gets the variable of this tap expression.
*/
final VarDecl getVar() { result = getImmediateVar().resolve() }
}