@@ -7,6 +7,8 @@ CodeQL has a large selection of classes for representing the abstract syntax tre
77
88.. include :: ../reusables/abstract-syntax-tree.rst
99
10+ The descriptions below use the following conventions and placeholders.
11+
1012* An ``IDENTIFIER `` denotes an arbitrary identifier.
1113* A ``CNAME `` denotes a class or module name.
1214* An ``FNAME `` denotes a method name.
@@ -16,7 +18,7 @@ CodeQL has a large selection of classes for representing the abstract syntax tre
1618Statement classes
1719~~~~~~~~~~~~~~~~~
1820
19- This table lists subclasses of Stmt _ representing Ruby statements.
21+ This table lists subclasses of Stmt _ that represent Ruby statements.
2022
2123+---------------------------------+--------------+----------------+---------+
2224| Statement syntax | CodeQL class | Superclasses | Remarks |
6062+----------------------------+---------------------+----------------+-------------------------------+
6163| ``yield `` «Expr _ ``, ``»* | YieldCall _ | Call _ | |
6264+----------------------------+---------------------+----------------+-------------------------------+
63- | ``&IDENTIFIER `` | BlockArgument _ | Expr _ | Used as an argument to a call |
65+ | ``&``IDENTIFIER | BlockArgument _ | Expr _ | Used as an argument to a call |
6466+----------------------------+---------------------+----------------+-------------------------------+
6567| ``... `` | ForwardedArguments _ | Expr _ | Used as an argument to a call |
6668+----------------------------+---------------------+----------------+-------------------------------+
@@ -116,25 +118,25 @@ Unary operations
116118
117119All classes in this subsection are subclasses of UnaryOperation _.
118120
119- +--------------------+----------------+- ---------------------------+-------------------+
121+ +--------------------+-----------------+ ---------------------------+-------------------+
120122| Expression syntax | CodeQL class | Superclasses | Remarks |
121- +====================+================+= ===========================+===================+
123+ +====================+=================+ ===========================+===================+
122124| ``~ `` Expr _ | ComplementExpr _ | UnaryBitwiseOperation _ | |
123- +--------------------+----------------+- ---------------------------+-------------------+
125+ +--------------------+-----------------+ ---------------------------+-------------------+
124126| ``defined? `` Expr _ | DefinedExpr _ | UnaryOperation _ | |
125- +--------------------+----------------+- ---------------------------+-------------------+
127+ +--------------------+-----------------+ ---------------------------+-------------------+
126128| ``** `` Expr _ | HashSplatExpr _ | UnaryOperation _ | |
127- +--------------------+----------------+- ---------------------------+-------------------+
129+ +--------------------+-----------------+ ---------------------------+-------------------+
128130| ``! `` Expr _ | NotExpr _ | UnaryOperation _ | |
129- +--------------------+----------------+- ---------------------------+-------------------+
131+ +--------------------+-----------------+ ---------------------------+-------------------+
130132| ``not `` Expr _ | NotExpr _ | UnaryOperation _ | |
131- +--------------------+----------------+- ---------------------------+-------------------+
133+ +--------------------+-----------------+ ---------------------------+-------------------+
132134| ``* `` Expr _ | SplatExpr _ | UnaryOperation _ | |
133- +--------------------+----------------+- ---------------------------+-------------------+
135+ +--------------------+-----------------+ ---------------------------+-------------------+
134136| ``- `` Expr _ | UnaryMinusExpr _ | UnaryArithmeticOperation _ | |
135- +--------------------+----------------+- ---------------------------+-------------------+
137+ +--------------------+-----------------+ ---------------------------+-------------------+
136138| ``+ `` Expr _ | UnaryPlusExpr _ | UnaryArithmeticOperation _ | |
137- +--------------------+----------------+- ---------------------------+-------------------+
139+ +--------------------+-----------------+ ---------------------------+-------------------+
138140
139141Binary operations
140142~~~~~~~~~~~~~~~~~
@@ -336,7 +338,7 @@ All classes in this subsection are subclasses of Parameter_.
336338Pattern classes
337339~~~~~~~~~~~~~~~
338340
339- All classes in this subsection are subclasses of CasePattern _. These expressions typically occur in the context of a ``case `` using pattern matching syntax.
341+ All classes in this subsection are subclasses of CasePattern _. These expressions typically occur when a ``case `` uses pattern matching syntax.
340342
341343+--------------------------------------------------------------------------------+-----------------------+--------------+-------------------+
342344| Expression syntax | CodeQL class | Superclasses | Remarks |
@@ -392,7 +394,7 @@ All classes in this subsection are subclasses of VariableAccess_.
392394
393395+----------------------------+------------------------------+-----------------------------------------------+------------------+
394396| Example expression syntax | CodeQL class | Superclasses | Remarks |
395- +===========================+==============================+= ===============================================+==================+
397+ +============================ +==============================+===============================================+==================+
396398| ``@@foo `` | ClassVariableReadAccess _ | VariableReadAccess _, ClassVariableAccess _ | |
397399+----------------------------+------------------------------+-----------------------------------------------+------------------+
398400| ``@@foo = 'str' `` | ClassVariableWriteAccess _ | VariableWriteAccess _, ClassVariableAccess _ | |
0 commit comments