| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,7 @@ CodeQL has a large selection of classes for representing the abstract syntax tre | |||
| 8 | 8 | .. include:: ../reusables/abstract-syntax-tree.rst | |
| 9 | 9 | ||
| 10 | 10 | An ``IDENTIFIER`` should match the regular expression ``/[a-zA-Z_][a-zA-Z0-9_]*/``. A ``CNAME`` should match ``/[A-Z][a-zA-Z0-9_]*/``. | |
| 11 | + ``TERM`` is either a semicolon or a newline used to terminate a statement. | ||
| 11 | 12 | ||
| 12 | 13 | Statement classes | |
| 13 | 14 | ~~~~~~~~~~~~~~~~~ | |
@@ -74,10 +75,6 @@ All classes in this subsection are subclasses of ConstantAccess_. | |||
| 74 | 75 | +========================================+======================+======================+===================+ | |
| 75 | 76 | | CNAME | ConstantReadAccess_ | ConstantAccess_ | | | |
| 76 | 77 | +----------------------------------------+----------------------+----------------------+-------------------+ | |
| 77 | - | ``class`` CNAME StmtSequence_ ``end`` | ConstantWriteAccess_ | ConstantAccess_ | class definition | | ||
| 78 | - +----------------------------------------+----------------------+----------------------+-------------------+ | ||
| 79 | - | ``module`` CNAME StmtSequence_ ``end`` | ConstantWriteAccess_ | ConstantAccess_ | module definition | | ||
| 80 | - +----------------------------------------+----------------------+----------------------+-------------------+ | ||
| 81 | 78 | | CNAME ``=`` Expr_ | ConstantAssignment_ | ConstantWriteAccess_ | | | |
| 82 | 79 | +----------------------------------------+----------------------+----------------------+-------------------+ | |
| 83 | 80 | ||
@@ -272,6 +269,19 @@ All classes in this subsection are subclasses of Literal_. | |||
| 272 | 269 | | ``:foo`` | SymbolLiteral_ | StringlikeLiteral_ | | | |
| 273 | 270 | +----------------------------+-------------------+----------------------------+-------------------+ | |
| 274 | 271 | ||
| 272 | + Modules and Ruby classes | ||
| 273 | + ~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 274 | + | ||
| 275 | + All classes in this subsection are subclasses of BodyStmt_ and Scope_. | ||
| 276 | + | ||
| 277 | + +----------------------------------------------------------------+--------------------+----------------------------------+-------------------+ | ||
| 278 | + | Expression syntax | CodeQL class | Superclasses | Remarks | | ||
| 279 | + +================================================================+====================+==================================+===================+ | ||
| 280 | + | ``class`` CNAME [``<`` Expr_] TERM StmtSequence_ TERM ``end`` | ClassDeclaration_ | Namespace_, ConstantWriteAccess_ | | | ||
| 281 | + | ``module`` CNAME TERM StmtSequence_ TERM ``end`` | ModuleDeclaration_ | Namespace_, ConstantWriteAccess_ | | | ||
| 282 | + | ``class <<`` Expr_ TERM StmtSequence_ TERM ``end`` | SingletonClass_ | ModuleBase_ | | | ||
| 283 | + +----------------------------------------------------------------+--------------------+----------------------------------+-------------------+ | ||
| 284 | + | ||
| 275 | 285 | Method classes | |
| 276 | 286 | ~~~~~~~~~~~~~~ | |
| 277 | 287 | ||
@@ -297,20 +307,9 @@ All classes in this subsection are subclasses of Callable_. | |||
| 297 | 307 | | ``(`` StmtSequence_ ``)`` | ParenthesizedExpr_ | StmtSequence_ | | | |
| 298 | 308 | | ``rescue`` TODO | RescueClause_ | Expr_ | | | |
| 299 | 309 | | Stmt_ ``rescue`` Stmt_ | RescueModifierExpr_ | Expr_ | | | |
| 300 | - | StmtSequence_ ``;`` Stmt_ | StmtSequence_ | Expr_ | A sequence of 0 or more statements, separated by semicolons or newlines | | ||
| 310 | + | StmtSequence_ TERM Stmt_ | StmtSequence_ | Expr_ | A sequence of 0 or more statements, separated by semicolons or newlines | | ||
| 301 | 311 | | StringLiteral_ StringLiteral_ | StringConcatenation_ | Expr_ | Implicit concatenation of consecutive string literals | | |
| 302 | 312 | ||
| 303 | - | ||
| 304 | - .. | ||
| 305 | - Module.qll | ||
| 306 | - | | ClassDeclaration_ | | | | ||
| 307 | - | | Module_ | | | | ||
| 308 | - | | ModuleBase_ | | | | ||
| 309 | - | | ModuleDeclaration_ | | | | ||
| 310 | - | | Namespace_ | | | | ||
| 311 | - | | SingletonClass_ | | | | ||
| 312 | - | | Toplevel_ | | | | ||
| 313 | - | ||
| 314 | 313 | .. | |
| 315 | 314 | Parameter.qll | |
| 316 | 315 | | | BlockParameter_ | | | | |
| Back | FazBrowse Home | New Git URL |
0 commit comments