File tree Expand file tree Collapse file tree
ruby/ql/lib/codeql/ruby/ast Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,6 +170,24 @@ module ConstantValue {
170170
171171 /** A constant `nil` value. */
172172 class ConstantNilValue extends ConstantValue , TNil { }
173+
174+ /** Gets the integer constant `x`. */
175+ ConstantValue getInt ( int x ) { result .getInt ( ) = x }
176+
177+ /** Gets the float constant `x`. */
178+ ConstantValue getFloat ( float x ) { result .getFloat ( ) = x }
179+
180+ /** Gets the string constant `x`. */
181+ ConstantValue getString ( string x ) { result .getString ( ) = x }
182+
183+ /** Gets the symbol constant `x`. */
184+ ConstantValue getSymbol ( string x ) { result .getSymbol ( ) = x }
185+
186+ /** Gets the regexp constant `x`. */
187+ ConstantValue getRegExp ( string x ) { result .getRegExp ( ) = x }
188+
189+ /** Gets the string, symbol, or regexp constant `x`. */
190+ ConstantValue getStringlikeValue ( string x ) { result .getStringlikeValue ( ) = x }
173191}
174192
175193/** An access to a constant. */
You can’t perform that action at this time.
0 commit comments