зеркало из https://github.com/github/codeql.git
Ruby: add convenience-accessors for ConstantValue
This commit is contained in:
Родитель
046e669c78
Коммит
06ec03de74
|
@ -170,6 +170,24 @@ module ConstantValue {
|
|||
|
||||
/** A constant `nil` value. */
|
||||
class ConstantNilValue extends ConstantValue, TNil { }
|
||||
|
||||
/** Gets the integer constant `x`. */
|
||||
ConstantValue getInt(int x) { result.getInt() = x }
|
||||
|
||||
/** Gets the float constant `x`. */
|
||||
ConstantValue getFloat(float x) { result.getFloat() = x }
|
||||
|
||||
/** Gets the string constant `x`. */
|
||||
ConstantValue getString(string x) { result.getString() = x }
|
||||
|
||||
/** Gets the symbol constant `x`. */
|
||||
ConstantValue getSymbol(string x) { result.getSymbol() = x }
|
||||
|
||||
/** Gets the regexp constant `x`. */
|
||||
ConstantValue getRegExp(string x) { result.getRegExp() = x }
|
||||
|
||||
/** Gets the string, symbol, or regexp constant `x`. */
|
||||
ConstantValue getStringlikeValue(string x) { result.getStringlikeValue() = x }
|
||||
}
|
||||
|
||||
/** An access to a constant. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче