Module AST
Import path
import codeql.ruby.AST
Imports
Locations | Provides classes for working with locations. |
Classes
AddExpr | An add expression. |
AddExprRoot | A series of add expressions, e.g. |
AliasStmt | An |
AlternativePattern | A composite pattern matching one of the given sub-patterns, for example: |
ArgumentList | A sequence of expressions in the right-hand side of an assignment or a |
ArrayLiteral | An array literal. |
ArrayPattern | An array pattern, for example: |
AsPattern | A pattern match that binds to the specified local variable, for example |
AssignAddExpr | A |
AssignArithmeticOperation | An arithmetic assignment operation: |
AssignBitwiseAndExpr | A bitwise AND assignment operation. |
AssignBitwiseOperation | A bitwise assignment operation: |
AssignBitwiseOrExpr | A bitwise OR assignment operation. |
AssignBitwiseXorExpr | An XOR (exclusive OR) assignment operation. |
AssignDivExpr | A |
AssignExponentExpr | A |
AssignExpr | An assignment operation with the operator |
AssignLShiftExpr | A left-shift assignment operation. |
AssignLogicalAndExpr | A logical AND assignment operation. |
AssignLogicalOperation | A logical assignment operation: |
AssignLogicalOrExpr | A logical OR assignment operation. |
AssignModuloExpr | A |
AssignMulExpr | A |
AssignOperation | A binary assignment operation other than |
AssignRShiftExpr | A right-shift assignment operation. |
AssignSubExpr | A |
Assignment | A binary assignment operation, including |
AstNode | A node in the abstract syntax tree. This class is the base class for all Ruby program elements. |
BeginBlock | A |
BeginExpr | A |
BinaryArithmeticOperation | A binary arithmetic operation. |
BinaryBitwiseOperation | A binary bitwise operation. |
BinaryLogicalOperation | A binary logical operation. |
BinaryOperation | A binary operation. |
BitwiseAndExpr | A bitwise AND operation. |
BitwiseOrExpr | A bitwise OR operation. |
BitwiseXorExpr | An XOR (exclusive OR) operation. |
Block | A block. |
BlockArgument | A block argument in a method call. |
BlockParameter | A parameter that is a block. For example, |
BodyStmt | A sequence of statements representing the body of a method, class, module, or do-block. That is, any body that may also include rescue/ensure/else statements. |
BooleanLiteral | A Boolean literal. |
BraceBlock | A block defined using curly braces, e.g. in the following code: |
BreakStmt | A |
Call | A call. |
Callable | A callable. |
CaseEqExpr | A case-equality (or ‘threequals’) expression. |
CaseExpr | A |
CasePattern | A pattern used in a |
CharacterLiteral | A character literal. |
ClassDeclaration | A class definition. |
ClassVariable | A class variable. |
ClassVariableAccess | An access to a class variable. |
ClassVariableReadAccess | An access to a class variable where the value is read. |
ClassVariableWriteAccess | An access to a class variable where the value is updated. |
ComparisonOperation | A comparison operation. That is, either an equality operation or a relational operation. |
ComplementExpr | A complement (bitwise NOT) expression. |
ComplexLiteral | A complex literal. |
ConditionalExpr | A conditional expression: |
ConditionalLoop | A loop using a condition expression. That is, a |
ConstantAccess | An access to a constant. |
ConstantAssignment | A definition of a constant via assignment. For example, the left-hand operand in the following example: |
ConstantReadAccess | A use (read) of a constant. |
ConstantValue | A constant value. |
ConstantWriteAccess | A definition of a constant. |
ControlExpr | A control expression that can be any of the following: - |
DefinedExpr | A call to the special |
DestructuredLhsExpr | A “left-hand-side” (LHS) expression of a destructured assignment. |
DestructuredParameter | A parameter defined using destructuring. For example |
DivExpr | A divide expression. |
DoBlock | A block enclosed within |
ElementReference | An element reference; a call to the |
EmptyStmt | An empty statement ( |
EncodingLiteral | An |
EndBlock | An |
EqExpr | An equals expression. |
EqualityOperation | An equality operation. |
ErbAstNode | A node in the ERB abstract syntax tree. This class is the base class for all ERB elements. |
ErbCode | An ERB token appearing within a code directive. This will typically be interpreted as Ruby code or a GraphQL query, depending on context. |
ErbComment | An ERB token appearing within a comment directive. |
ErbCommentDirective | A comment directive in an ERB template. |
ErbDirective | A directive in an ERB template. |
ErbExecutionDirective | An execution directive in an ERB template. This code will be executed as Ruby, but not rendered. |
ErbFile | A |
ErbGraphqlDirective | A GraphQL directive in an ERB template. |
ErbOutputDirective | An output directive in an ERB template. |
ErbTemplate | An ERB template. This can contain multiple directives to be executed when the template is compiled. |
ErbToken | An ERB token. This could be embedded code, a comment, or arbitrary text. |
ExponentExpr | An exponent expression. |
Expr | An expression. |
FileLiteral | A |
FindPattern | A find pattern, for example: |
FloatLiteral | A floating-point literal. |
ForExpr | A |
ForwardParameter | A special |
ForwardedArguments | A |
GEExpr | A greater-than-or-equal expression. |
GTExpr | A greater-than expression. |
GlobalVariable | A global variable. |
GlobalVariableAccess | An access to a global variable. |
GlobalVariableReadAccess | An access to a global variable where the value is read. |
GlobalVariableWriteAccess | An access to a global variable where the value is updated. |
HashLiteral | A hash literal. |
HashPattern | A hash pattern, for example: |
HashSplatExpr | A hash-splat (or ‘double-splat’) expression. |
HashSplatNilParameter | A |
HashSplatParameter | A hash-splat (or double-splat) parameter. For example, |
HereDoc | A “here document”. For example: |
IfExpr | An |
IfModifierExpr | An expression modified using |
InClause | An |
InstanceVariable | An instance variable. |
InstanceVariableAccess | An access to an instance variable. |
InstanceVariableReadAccess | An access to an instance variable where the value is read. |
InstanceVariableWriteAccess | An access to an instance variable where the value is updated. |
IntegerLiteral | An integer literal. |
KeywordParameter | A keyword parameter, including a default value if the parameter is optional. For example, in the following example, |
LEExpr | A less-than-or-equal expression. |
LShiftExpr | A left-shift operation. |
LTExpr | A less-than expression. |
Lambda | A lambda (anonymous method). For example: |
LhsExpr | A “left-hand-side” (LHS) expression. An |
LineLiteral | A |
Literal | A literal. |
LocalVariable | A local variable. |
LocalVariableAccess | An access to a local variable. |
LocalVariableReadAccess | An access to a local variable where the value is read. |
LocalVariableWriteAccess | An access to a local variable where the value is updated. |
LogicalAndExpr | A logical AND operation, using either |
LogicalOrExpr | A logical OR operation, using either |
Loop | A loop. That is, a |
MatchPattern | A one-line pattern match using the |
Method | A normal method. |
MethodBase | A method. |
MethodCall | A method call. |
MethodName | A method name literal. For example: |
Module | A representation of a run-time |
ModuleBase | The base class for classes, singleton classes, and modules. |
ModuleDeclaration | A module definition. |
ModuloExpr | A modulo expression. |
MulExpr | A multiply expression. |
NEExpr | A not-equals expression. |
NamedParameter | A named parameter. |
Namespace | A class or module definition. |
NextStmt | A |
NilLiteral | A |
NoRegExpMatchExpr | A regexp-doesn’t-match expression. |
NotExpr | A logical NOT operation, using either |
NumericLiteral | A numeric literal, i.e. an integer, floating-point, rational, or complex value. |
Operation | An operation. |
OptionalParameter | An optional parameter. For example, the parameter |
Pair | A pair expression. For example, in a hash: |
Parameter | A parameter. |
ParenthesizedExpr | A parenthesized expression sequence, typically containing a single expression: |
ParenthesizedPattern | A parenthesized pattern: |
RShiftExpr | A right-shift operation. |
RangeLiteral | A range literal. |
RationalLiteral | A rational literal. |
RedoStmt | A |
ReferencePattern | A variable or value reference in a pattern, i.e. |
RegExpComponent | The base class for a component of a regular expression literal. |
RegExpEscapeSequenceComponent | An escape sequence component of a regex literal. |
RegExpInterpolationComponent | An interpolation expression component of a regex literal. |
RegExpLiteral | A regular expression literal. |
RegExpMatchExpr | A regexp match expression. |
RegExpTextComponent | A component of a regex literal that is simply text. |
RelationalOperation | A relational operation, that is, one of |
RescueClause | A rescue clause. For example: |
RescueModifierExpr | An expression with a |
RetryStmt | A |
ReturnStmt | A |
ReturningStmt | A statement that may return a value: |
RubyFile | A Ruby source file |
Scope | A variable scope. This is either a top-level (file), a module, a class, or a callable. |
SelfScope | A scope in which a |
SelfVariable | A |
SelfVariableAccess | An access to the |
SelfVariableReadAccess | An access to the |
SetterMethodCall | A call to a setter method. |
SimpleParameter | A simple (normal) parameter. |
SingletonClass | A definition of a singleton class on an object. |
SingletonMethod | A singleton method. |
SpaceshipExpr | A three-way comparison (‘spaceship’) expression. |
SplatExpr | A splat expression. |
SplatParameter | A splat parameter. For example, |
Stmt | A statement. |
StmtSequence | A sequence of expressions. |
StringComponent | The base class for a component of a string: |
StringConcatenation | A concatenation of string literals. |
StringEscapeSequenceComponent | An escape sequence component of a string or string-like literal. |
StringInterpolationComponent | An interpolation expression component of a string or string-like literal. |
StringLiteral | A string literal. |
StringTextComponent | A component of a string (or string-like) literal that is simply text. |
StringlikeLiteral | A string, symbol, regexp, or subshell literal. |
SubExpr | A subtract expression. |
SubshellLiteral | A subshell literal. |
SuccessfullyExtractedFile | A successfully extracted file, that is, a file that was extracted and contains no extraction errors or warnings. |
SuperCall | A call to |
SymbolLiteral | A symbol literal. |
TernaryIfExpr | A conditional expression using the ternary ( |
TestPattern | A one-line pattern match using the |
Toplevel | A Ruby source file. |
UnaryArithmeticOperation | A unary arithmetic operation. |
UnaryBitwiseOperation | A unary bitwise operation. |
UnaryLogicalOperation | A unary logical operation. |
UnaryMinusExpr | A unary minus expression. |
UnaryOperation | A unary operation. |
UnaryPlusExpr | A unary plus expression. |
UndefStmt | An |
UnknownMethodCall | A |
UnlessExpr | An |
UnlessModifierExpr | An expression modified using |
UntilExpr | An |
UntilModifierExpr | An expression looped using the |
Variable | A variable declared in a scope. |
VariableAccess | An access to a variable. |
VariableReadAccess | An access to a variable where the value is read. |
VariableWriteAccess | An access to a variable where the value is updated. |
WhenClause | A |
WhileExpr | A |
WhileModifierExpr | An expression looped using the |
YieldCall | A call to |
Modules
ConstantValue | Provides different sub classes of |