mirror of
https://github.com/hohn/codeql-info.git
synced 2025-12-16 20:53:04 +01:00
1170 lines
136 KiB
HTML
1170 lines
136 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="en" data-content_root="../">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>Abstract syntax tree classes for working with Ruby programs — CodeQL</title>
|
|
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
|
|
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=93459777" />
|
|
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
|
|
<script src="../_static/doctools.js?v=888ff710"></script>
|
|
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
<link rel="icon" href="../_static/favicon.ico"/>
|
|
<link rel="index" title="Index" href="../genindex.html" />
|
|
<link rel="search" title="Search" href="../search.html" />
|
|
<link rel="next" title="Analyzing data flow in Ruby" href="analyzing-data-flow-in-ruby.html" />
|
|
<link rel="prev" title="CodeQL library for Ruby" href="codeql-library-for-ruby.html" />
|
|
|
|
<title>CodeQL docs</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/primer.css" type="text/css" />
|
|
|
|
|
|
</head><body>
|
|
<header class="Header">
|
|
<div class="Header-item--full">
|
|
<a href="https://codeql.github.com/docs" class="Header-link f2 d-flex flex-items-center">
|
|
<!-- <%= octicon "mark-github", class: "mr-2", height: 32 %> -->
|
|
<svg height="32" class="octicon octicon-mark-github mr-2" viewBox="0 0 16 16" version="1.1" width="32"
|
|
aria-hidden="true">
|
|
<path fill-rule="evenodd"
|
|
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z">
|
|
</path>
|
|
</svg>
|
|
<span class="hide-sm">CodeQL documentation</span>
|
|
</a>
|
|
</div>
|
|
<div class="Header-item hide-sm hide-md">
|
|
<script src="https://addsearch.com/js/?key=93b4d287e2fc079a4089412b669785d5&categories=!0xhelp.semmle.com,0xcodeql.github.com,1xdocs,1xcodeql-standard-libraries,1xcodeql-query-help"></script>
|
|
</div>
|
|
<div class="Header-item">
|
|
|
|
<details class="dropdown details-reset details-overlay d-inline-block">
|
|
<summary class="btn bg-gray-dark text-white border" aria-haspopup="true">
|
|
CodeQL resources
|
|
<div class="dropdown-caret"></div>
|
|
</summary>
|
|
|
|
<ul class="dropdown-menu dropdown-menu-se dropdown-menu-dark">
|
|
<li><a class="dropdown-item" href="https://codeql.github.com/docs/codeql-overview">CodeQL overview</a></li>
|
|
<li class="dropdown-divider" role="separator"></li>
|
|
<div class="dropdown-header">
|
|
CodeQL tools
|
|
</div>
|
|
<li><a class="dropdown-item" href="https://codeql.github.com/docs/codeql-for-visual-studio-code">CodeQL for VS Code</a>
|
|
<li><a class="dropdown-item" href="https://codeql.github.com/docs/codeql-cli">CodeQL CLI</a>
|
|
</li>
|
|
<li class="dropdown-divider" role="separator"></li>
|
|
<div class="dropdown-header">
|
|
CodeQL guides
|
|
</div>
|
|
<li><a class="dropdown-item" href="https://codeql.github.com/docs/writing-codeql-queries">Writing CodeQL queries</a></li>
|
|
<li><a class="dropdown-item" href="https://codeql.github.com/docs/codeql-language-guides">CodeQL language guides</a>
|
|
<li class="dropdown-divider" role="separator"></li>
|
|
<div class="dropdown-header">
|
|
Reference docs
|
|
</div>
|
|
<li><a class="dropdown-item" href="https://codeql.github.com/docs/ql-language-reference/">QL language
|
|
reference</a>
|
|
<li><a class="dropdown-item" href="https://codeql.github.com/codeql-standard-libraries">CodeQL
|
|
standard-libraries</a>
|
|
<li><a class="dropdown-item" href="https://codeql.github.com/codeql-query-help">CodeQL
|
|
query help</a>
|
|
<li class="dropdown-divider" role="separator"></li>
|
|
<div class="dropdown-header">
|
|
Source files
|
|
</div>
|
|
<li><a class="dropdown-item" href="https://github.com/github/codeql">CodeQL repository</a>
|
|
</ul>
|
|
</details>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
<main class="bg-gray-light clearfix">
|
|
<nav class="SideNav position-sticky top-0 col-lg-3 col-md-3 float-left p-4 hide-sm hide-md overflow-y-auto">
|
|
|
|
<ul class="current">
|
|
<li class="toctree-l1"><a class="reference internal" href="../codeql-overview/index.html">CodeQL overview</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../codeql-for-visual-studio-code/index.html">CodeQL for Visual Studio Code</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../codeql-cli/index.html">CodeQL CLI</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../writing-codeql-queries/index.html">Writing CodeQL queries</a></li>
|
|
<li class="toctree-l1 current"><a class="reference internal" href="index.html">CodeQL language guides</a><ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="codeql-for-cpp.html">CodeQL for C and C++</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="codeql-for-csharp.html">CodeQL for C#</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="codeql-for-go.html">CodeQL for Go</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="codeql-for-java.html">CodeQL for Java and Kotlin</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="codeql-for-javascript.html">CodeQL for JavaScript and TypeScript</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="codeql-for-python.html">CodeQL for Python</a></li>
|
|
<li class="toctree-l2 current"><a class="reference internal" href="codeql-for-ruby.html">CodeQL for Ruby</a><ul class="current">
|
|
<li class="toctree-l3"><a class="reference internal" href="basic-query-for-ruby-code.html">Basic query for Ruby code</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="codeql-library-for-ruby.html">CodeQL library for Ruby</a></li>
|
|
<li class="toctree-l3 current"><a class="current reference internal" href="#">Abstract syntax tree classes for working with Ruby programs</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="analyzing-data-flow-in-ruby.html">Analyzing data flow in Ruby</a></li>
|
|
<li class="toctree-l3"><a class="reference internal" href="using-api-graphs-in-ruby.html">Using API graphs in Ruby</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="codeql-for-swift.html">CodeQL for Swift</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../ql-language-reference/index.html">QL language reference</a></li>
|
|
</ul>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
<div class="body col-sm-12 col-md-9 col-lg-9 float-left border-left">
|
|
|
|
<div class="hide-lg hide-xl px-4 pt-4">
|
|
|
|
<div class="related" role="navigation" aria-label="related navigation">
|
|
<ul>
|
|
<li class="nav-item nav-item-0"><a href="../contents.html">CodeQL</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="index.html"
|
|
>CodeQL language guides</a> »</li>
|
|
<li class="nav-item nav-item-2"><a href="codeql-for-ruby.html"
|
|
accesskey="U">CodeQL for Ruby</a> »</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<article class="p-4 col-lg-10 col-md-10 col-sm-12">
|
|
|
|
<section id="abstract-syntax-tree-classes-for-working-with-ruby-programs">
|
|
<span id="id1"></span><h1>Abstract syntax tree classes for working with Ruby programs<a class="headerlink" href="#abstract-syntax-tree-classes-for-working-with-ruby-programs" title="Link to this heading">¶</a></h1>
|
|
<p>CodeQL has a large selection of classes for representing the abstract syntax tree of Ruby programs.</p>
|
|
<p>The <a class="reference external" href="https://en.wikipedia.org/wiki/Abstract_syntax_tree">abstract syntax tree (AST)</a> represents the syntactic structure of a program. Nodes on the AST represent elements such as statements and expressions.</p>
|
|
<p>The descriptions below use the following conventions and placeholders.</p>
|
|
<ul class="simple">
|
|
<li><p>An <code class="docutils literal notranslate"><span class="pre">IDENTIFIER</span></code> denotes an arbitrary identifier.</p></li>
|
|
<li><p>A <code class="docutils literal notranslate"><span class="pre">CNAME</span></code> denotes a class or module name.</p></li>
|
|
<li><p>An <code class="docutils literal notranslate"><span class="pre">FNAME</span></code> denotes a method name.</p></li>
|
|
<li><p>A <code class="docutils literal notranslate"><span class="pre">TERM</span></code> is either a semicolon or a newline used to terminate a statement.</p></li>
|
|
<li><p>Elements enclosed in <code class="docutils literal notranslate"><span class="pre">«</span> <span class="pre">»</span></code> are grouped and may be suffixed by <code class="docutils literal notranslate"><span class="pre">?</span></code>, <code class="docutils literal notranslate"><span class="pre">*</span></code>, or <code class="docutils literal notranslate"><span class="pre">+</span></code> to denote 0 or 1 occurrences, 0 or more occurrences, and 1 or more occurrences respectively.</p></li>
|
|
</ul>
|
|
<section id="statement-classes">
|
|
<h2>Statement classes<a class="headerlink" href="#statement-classes" title="Link to this heading">¶</a></h2>
|
|
<p>This table lists subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a> that represent Ruby statements.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Statement syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">alias</span></code> FNAME FNAME</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$AliasStmt.html">AliasStmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">BEGIN</span> <span class="pre">{</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> <code class="docutils literal notranslate"><span class="pre">}</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$BeginBlock.html">BeginBlock</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">begin</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$BeginExpr.html">BeginExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">break</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a>»?</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$BreakStmt.html">BreakStmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$ReturningStmt.html">ReturningStmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">;</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$EmptyStmt.html">EmptyStmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">END</span> <span class="pre">{</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> <code class="docutils literal notranslate"><span class="pre">}</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$EndBlock.html">EndBlock</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">next</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a>»?</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$NextStmt.html">NextStmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$ReturningStmt.html">ReturningStmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">redo</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$RedoStmt.html">RedoStmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">retry</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$RetryStmt.html">RetryStmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">return</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a>»?</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$ReturnStmt.html">ReturnStmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$ReturningStmt.html">ReturningStmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">undef</span></code> «FNAME <code class="docutils literal notranslate"><span class="pre">,</span></code>»+</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$UndefStmt.html">UndefStmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="calls">
|
|
<h2>Calls<a class="headerlink" href="#calls" title="Link to this heading">¶</a></h2>
|
|
<p>This table lists subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$Call.html">Call</a> as well as some expressions that appear as call arguments.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">[</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">]</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$ElementReference.html">ElementReference</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$MethodCall.html">MethodCall</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$MethodName.html">MethodName</a> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">,</span></code>»*</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$MethodCall.html">MethodCall</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$Call.html">Call</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$SetterMethodCall.html">SetterMethodCall</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$MethodCall.html">MethodCall</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">super</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$SuperCall.html">SuperCall</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$MethodCall.html">MethodCall</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">yield</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">,</span></code>»*</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$YieldCall.html">YieldCall</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$Call.html">Call</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">&</span></code> IDENTIFIER</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$BlockArgument.html">BlockArgument</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p>Used as an argument to a call</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">...</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$ForwardedArguments.html">ForwardedArguments</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p>Used as an argument to a call</p></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="constant-accesses">
|
|
<h2>Constant accesses<a class="headerlink" href="#constant-accesses" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Constant.qll/type.Constant$ConstantAccess.html">ConstantAccess</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p>CNAME</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Constant.qll/type.Constant$ConstantReadAccess.html">ConstantReadAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Constant.qll/type.Constant$ConstantAccess.html">ConstantAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>CNAME <code class="docutils literal notranslate"><span class="pre">=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Constant.qll/type.Constant$ConstantAssignment.html">ConstantAssignment</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Constant.qll/type.Constant$ConstantWriteAccess.html">ConstantWriteAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="control-expressions">
|
|
<h2>Control expressions<a class="headerlink" href="#control-expressions" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ControlExpr.html">ControlExpr</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">if</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">then</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> «<code class="docutils literal notranslate"><span class="pre">elsif</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">then</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a>»* «<code class="docutils literal notranslate"><span class="pre">else</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a>»? <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$IfExpr.html">IfExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ConditionalExpr.html">ConditionalExpr</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ControlExpr.html">ControlExpr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">while</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">do</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$WhileExpr.html">WhileExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ConditionalLoop.html">ConditionalLoop</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">until</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">do</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$UntilExpr.html">UntilExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ConditionalLoop.html">ConditionalLoop</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">for</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">in</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">do</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ForExpr.html">ForExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$Loop.html">Loop</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a> <code class="docutils literal notranslate"><span class="pre">while</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$WhileModifierExpr.html">WhileModifierExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ConditionalLoop.html">ConditionalLoop</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a> <code class="docutils literal notranslate"><span class="pre">until</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$UntilModifierExpr.html">UntilModifierExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ConditionalLoop.html">ConditionalLoop</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a> <code class="docutils literal notranslate"><span class="pre">if</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$IfModifierExpr.html">IfModifierExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ConditionalExpr.html">ConditionalExpr</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ControlExpr.html">ControlExpr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a> <code class="docutils literal notranslate"><span class="pre">unless</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$UnlessModifierExpr.html">UnlessModifierExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ConditionalExpr.html">ConditionalExpr</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ControlExpr.html">ControlExpr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">?</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a> <code class="docutils literal notranslate"><span class="pre">:</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$TernaryIfExpr.html">TernaryIfExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ConditionalExpr.html">ConditionalExpr</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ControlExpr.html">ControlExpr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">case</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">when</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">then</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> «<code class="docutils literal notranslate"><span class="pre">when</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">then</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a>»* «<code class="docutils literal notranslate"><span class="pre">else</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a>»? <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$CaseExpr.html">CaseExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ControlExpr.html">ControlExpr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">case</span> <span class="pre">when</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">then</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> «<code class="docutils literal notranslate"><span class="pre">else</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a>»? <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$CaseExpr.html">CaseExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ControlExpr.html">ControlExpr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">case</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">in</span></code> «TERM <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$CaseExpr.html">CaseExpr</a>»+ <code class="docutils literal notranslate"><span class="pre">end</span></code> f</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$CaseExpr.html">CaseExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Control.qll/type.Control$ControlExpr.html">ControlExpr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="unary-operations">
|
|
<h2>Unary operations<a class="headerlink" href="#unary-operations" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryOperation.html">UnaryOperation</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head" colspan="2"><p>CodeQL class | Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">~</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$ComplementExpr.html">ComplementExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryBitwiseOperation.html">UnaryBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">defined?</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$DefinedExpr.html">DefinedExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryOperation.html">UnaryOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">**</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$HashSplatExpr.html">HashSplatExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryOperation.html">UnaryOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">!</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$NotExpr.html">NotExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryOperation.html">UnaryOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">not</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$NotExpr.html">NotExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryOperation.html">UnaryOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">*</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$SplatExpr.html">SplatExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryOperation.html">UnaryOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">-</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryMinusExpr.html">UnaryMinusExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryArithmeticOperation.html">UnaryArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">+</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryPlusExpr.html">UnaryPlusExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$UnaryArithmeticOperation.html">UnaryArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="binary-operations">
|
|
<h2>Binary operations<a class="headerlink" href="#binary-operations" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryOperation.html">BinaryOperation</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">+</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AddExpr.html">AddExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryArithmeticOperation.html">BinaryArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">+=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignAddExpr.html">AssignAddExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignArithmeticOperation.html">AssignArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">&=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignBitwiseAndExpr.html">AssignBitwiseAndExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignBitwiseOperation.html">AssignBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">|=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignBitwiseOrExpr.html">AssignBitwiseOrExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignBitwiseOperation.html">AssignBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">^=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignBitwiseXorExpr.html">AssignBitwiseXorExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignBitwiseOperation.html">AssignBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">/=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignDivExpr.html">AssignDivExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignArithmeticOperation.html">AssignArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">**=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignExponentExpr.html">AssignExponentExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignArithmeticOperation.html">AssignArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre"><<=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignLShiftExpr.html">AssignLShiftExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignBitwiseOperation.html">AssignBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">&&=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignLogicalAndExpr.html">AssignLogicalAndExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryLogicalOperation.html">BinaryLogicalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">||=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignLogicalOrExpr.html">AssignLogicalOrExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryLogicalOperation.html">BinaryLogicalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">%=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignModuloExpr.html">AssignModuloExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignArithmeticOperation.html">AssignArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">*=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignMulExpr.html">AssignMulExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignArithmeticOperation.html">AssignArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">>>=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignRShiftExpr.html">AssignRShiftExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignBitwiseOperation.html">AssignBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">-=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignSubExpr.html">AssignSubExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignArithmeticOperation.html">AssignArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">&</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BitwiseAndExpr.html">BitwiseAndExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryBitwiseOperation.html">BinaryBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">|</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BitwiseOrExpr.html">BitwiseOrExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryBitwiseOperation.html">BinaryBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">^</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BitwiseXorExpr.html">BitwiseXorExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryBitwiseOperation.html">BinaryBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">===</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$CaseEqExpr.html">CaseEqExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$EqualityOperation.html">EqualityOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">/</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$DivExpr.html">DivExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryArithmeticOperation.html">BinaryArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">===</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$EqExpr.html">EqExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$EqualityOperation.html">EqualityOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">^</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$ExponentExpr.html">ExponentExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryArithmeticOperation.html">BinaryArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">>=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$GEExpr.html">GEExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$RelationalOperation.html">RelationalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">></span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$GTExpr.html">GTExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$RelationalOperation.html">RelationalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre"><=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$LEExpr.html">LEExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$RelationalOperation.html">RelationalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre"><<</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$LShiftExpr.html">LShiftExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryBitwiseOperation.html">BinaryBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre"><</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$LTExpr.html">LTExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$RelationalOperation.html">RelationalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">&&</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$LogicalAndExpr.html">LogicalAndExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryLogicalOperation.html">BinaryLogicalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">and</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$LogicalAndExpr.html">LogicalAndExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryLogicalOperation.html">BinaryLogicalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">||</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$LogicalOrExpr.html">LogicalOrExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryLogicalOperation.html">BinaryLogicalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">or</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$LogicalOrExpr.html">LogicalOrExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryLogicalOperation.html">BinaryLogicalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">%</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$ModuloExpr.html">ModuloExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryArithmeticOperation.html">BinaryArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">*</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$MulExpr.html">MulExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryArithmeticOperation.html">BinaryArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">!=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$NEExpr.html">NEExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$RelationalOperation.html">RelationalOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">!~</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$NoRegExpMatchExpr.html">NoRegExpMatchExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryOperation.html">BinaryOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">>></span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$RShiftExpr.html">RShiftExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryBitwiseOperation.html">BinaryBitwiseOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">=~</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$RegExpMatchExpr.html">RegExpMatchExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryOperation.html">BinaryOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre"><=></span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$SpaceshipExpr.html">SpaceshipExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryOperation.html">BinaryOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">-</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$SubExpr.html">SubExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$BinaryArithmeticOperation.html">BinaryArithmeticOperation</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a> <code class="docutils literal notranslate"><span class="pre">=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignExpr.html">AssignExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$Assignment.html">Assignment</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="literals">
|
|
<h2>Literals<a class="headerlink" href="#literals" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Example expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">[1,</span> <span class="pre">2]</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$ArrayLiteral.html">ArrayLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$BooleanLiteral.html">BooleanLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">?a</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$CharacterLiteral.html">CharacterLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">__ENCODING__</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$EncodingLiteral.html">EncodingLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">__FILE__</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$FileLiteral.html">FileLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">{</span> <span class="pre">foo:</span> <span class="pre">123,</span> <span class="pre">bar:</span> <span class="pre">456</span> <span class="pre">}</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$HashLiteral.html">HashLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><div class="line-block">
|
|
<div class="line"><code class="docutils literal notranslate"><span class="pre"><<FOO</span></code></div>
|
|
<div class="line"><code class="docutils literal notranslate"><span class="pre">hello</span> <span class="pre">world</span></code></div>
|
|
<div class="line"><code class="docutils literal notranslate"><span class="pre">FOO</span></code></div>
|
|
</div>
|
|
</td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$HereDoc.html">HereDoc</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringlikeLiteral.html">StringlikeLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">23</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$IntegerLiteral.html">IntegerLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$NumericLiteral.html">NumericLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">3.1</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$FloatLiteral.html">FloatLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$NumericLiteral.html">NumericLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">3+2i</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$ComplexLiteral.html">ComplexLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$NumericLiteral.html">NumericLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">2/3r</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$RationalLiteral.html">RationalLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$NumericLiteral.html">NumericLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">__LINE__</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$LineLiteral.html">LineLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">nil</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$NilLiteral.html">NilLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">(1..10)</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$RangeLiteral.html">RangeLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$Literal.html">Literal</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">/[a-z]+/</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$RegExpLiteral.html">RegExpLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringlikeLiteral.html">StringlikeLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">"hello</span> <span class="pre">world"</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringLiteral.html">StringLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringlikeLiteral.html">StringlikeLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">`ls</span> <span class="pre">-l`</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$SubshellLiteral.html">SubshellLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringlikeLiteral.html">StringlikeLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">%x(/bin/sh</span> <span class="pre">foo.sh)</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$SubshellLiteral.html">SubshellLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringlikeLiteral.html">StringlikeLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">:foo</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$SymbolLiteral.html">SymbolLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringlikeLiteral.html">StringlikeLiteral</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="modules-and-ruby-classes">
|
|
<h2>Modules and Ruby classes<a class="headerlink" href="#modules-and-ruby-classes" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$BodyStmt.html">BodyStmt</a> and <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Scope.qll/type.Scope$Scope.html">Scope</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">class</span></code> CNAME «<code class="docutils literal notranslate"><span class="pre"><</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a>»? TERM <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> TERM <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Module.qll/type.Module$ClassDeclaration.html">ClassDeclaration</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Module.qll/type.Module$Namespace.html">Namespace</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Constant.qll/type.Constant$ConstantWriteAccess.html">ConstantWriteAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">module</span></code> CNAME TERM <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> TERM <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Module.qll/type.Module$ModuleDeclaration.html">ModuleDeclaration</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Module.qll/type.Module$Namespace.html">Namespace</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Constant.qll/type.Constant$ConstantWriteAccess.html">ConstantWriteAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">class</span> <span class="pre"><<</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> TERM <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> TERM <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Module.qll/type.Module$SingletonClass.html">SingletonClass</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Module.qll/type.Module$ModuleBase.html">ModuleBase</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="callable-classes">
|
|
<h2>Callable classes<a class="headerlink" href="#callable-classes" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$Callable.html">Callable</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">{</span></code> «<code class="docutils literal notranslate"><span class="pre">|</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$Parameter.html">Parameter</a> <code class="docutils literal notranslate"><span class="pre">,</span></code>»* <code class="docutils literal notranslate"><span class="pre">|</span></code>»? <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> <code class="docutils literal notranslate"><span class="pre">}</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$BraceBlock.html">BraceBlock</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$Block.html">Block</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">do</span></code> «<code class="docutils literal notranslate"><span class="pre">|</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$Parameter.html">Parameter</a> <code class="docutils literal notranslate"><span class="pre">,</span></code>»* <code class="docutils literal notranslate"><span class="pre">|</span></code>»? <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$BodyStmt.html">BodyStmt</a> <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$DoBlock.html">DoBlock</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$Block.html">Block</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$BodyStmt.html">BodyStmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">-></span> <span class="pre">(</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$Parameter.html">Parameter</a> <code class="docutils literal notranslate"><span class="pre">,</span></code>»* <code class="docutils literal notranslate"><span class="pre">)</span></code> <code class="docutils literal notranslate"><span class="pre">{</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> <code class="docutils literal notranslate"><span class="pre">}</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$Lambda.html">Lambda</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$Callable.html">Callable</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$BodyStmt.html">BodyStmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">-></span> <span class="pre">(</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$Parameter.html">Parameter</a> <code class="docutils literal notranslate"><span class="pre">,</span></code>»* <code class="docutils literal notranslate"><span class="pre">)</span></code> <code class="docutils literal notranslate"><span class="pre">do</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$BodyStmt.html">BodyStmt</a> <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$Lambda.html">Lambda</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$Callable.html">Callable</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$BodyStmt.html">BodyStmt</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">def</span></code> FNAME «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$Parameter.html">Parameter</a> <code class="docutils literal notranslate"><span class="pre">,</span></code>»* TERM <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$BodyStmt.html">BodyStmt</a> TERM <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$Method.html">Method</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$MethodBase.html">MethodBase</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">def</span> <span class="pre">self.</span></code> FNAME «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$Parameter.html">Parameter</a> <code class="docutils literal notranslate"><span class="pre">,</span></code>»* TERM <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$BodyStmt.html">BodyStmt</a> TERM <code class="docutils literal notranslate"><span class="pre">end</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$SingletonMethod.html">SingletonMethod</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Method.qll/type.Method$MethodBase.html">MethodBase</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="parameter-classes">
|
|
<h2>Parameter classes<a class="headerlink" href="#parameter-classes" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$Parameter.html">Parameter</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">&</span></code> IDENTIFIER</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$BlockParameter.html">BlockParameter</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$NamedParameter.html">NamedParameter</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">(</span></code> «IDENTIFIER <code class="docutils literal notranslate"><span class="pre">,</span></code>»+ <code class="docutils literal notranslate"><span class="pre">)</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$DestructuredParameter.html">DestructuredParameter</a></p></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">...</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$ForwardParameter.html">ForwardParameter</a></p></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">**nil</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$HashSplatNilParameter.html">HashSplatNilParameter</a></p></td>
|
|
<td></td>
|
|
<td><p>Indicates that there are no keyword parameters or keyword patterns</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">**</span></code> IDENTIFIER</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$HashSplatParameter.html">HashSplatParameter</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$NamedParameter.html">NamedParameter</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>IDENTIFIER <code class="docutils literal notranslate"><span class="pre">:</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a>»?</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$KeywordParameter.html">KeywordParameter</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$NamedParameter.html">NamedParameter</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p>IDENTIFIER <code class="docutils literal notranslate"><span class="pre">=</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$OptionalParameter.html">OptionalParameter</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$NamedParameter.html">NamedParameter</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p>IDENTIFIER</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$SimpleParameter.html">SimpleParameter</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$NamedParameter.html">NamedParameter</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">*</span></code> IDENTIFIER</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$SplatParameter.html">SplatParameter</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Parameter.qll/type.Parameter$NamedParameter.html">NamedParameter</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="pattern-classes">
|
|
<h2>Pattern classes<a class="headerlink" href="#pattern-classes" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a>. These expressions typically occur when a <code class="docutils literal notranslate"><span class="pre">case</span></code> uses pattern matching syntax.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a> «<code class="docutils literal notranslate"><span class="pre">|</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a>»+</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$AlternativePattern.html">AlternativePattern</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">[</span></code> «CasePattern <code class="docutils literal notranslate"><span class="pre">,</span></code>»* «<code class="docutils literal notranslate"><span class="pre">*</span></code> IDENTIFIER»? <code class="docutils literal notranslate"><span class="pre">]</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$ArrayPattern.html">ArrayPattern</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a> <code class="docutils literal notranslate"><span class="pre">=></span></code> IDENTIFIER</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$AsPattern.html">AsPattern</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">[</span></code> <code class="docutils literal notranslate"><span class="pre">*</span></code> «IDENTIFIER»? (<code class="docutils literal notranslate"><span class="pre">,</span></code> CasePattern)* <code class="docutils literal notranslate"><span class="pre">,</span></code> <code class="docutils literal notranslate"><span class="pre">*</span></code> «IDENTIFIER»? <code class="docutils literal notranslate"><span class="pre">]</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$FindPattern.html">FindPattern</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">{</span></code> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringlikeLiteral.html">StringlikeLiteral</a> <code class="docutils literal notranslate"><span class="pre">:</span></code> CasePattern <code class="docutils literal notranslate"><span class="pre">,</span></code>»* «<code class="docutils literal notranslate"><span class="pre">**</span></code> IDENTIFIER»? <code class="docutils literal notranslate"><span class="pre">}</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$HashPattern.html">HashPattern</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">(</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a> <code class="docutils literal notranslate"><span class="pre">)</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$ParenthesizedPattern.html">ParenthesizedPattern</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">^</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$ReferencePattern.html">ReferencePattern</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Pattern.qll/type.Pattern$CasePattern.html">CasePattern</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="expression-classes">
|
|
<h2>Expression classes<a class="headerlink" href="#expression-classes" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p>«<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">,</span></code>»+</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$ArgumentList.html">ArgumentList</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p>The right-hand side of an assignment or a <code class="docutils literal notranslate"><span class="pre">return</span></code>, <code class="docutils literal notranslate"><span class="pre">break</span></code>, or <code class="docutils literal notranslate"><span class="pre">next</span></code> statement</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> «<a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$RescueClause.html">RescueClause</a>»? «<code class="docutils literal notranslate"><span class="pre">else</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a>»? «<code class="docutils literal notranslate"><span class="pre">ensure</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a>»?</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$BodyStmt.html">BodyStmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> «<code class="docutils literal notranslate"><span class="pre">,</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a>»+</p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$DestructuredLhsExpr.html">DestructuredLhsExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$LhsExpr.html">LhsExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p>An <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> appearing on the left-hand side of various operations. Can take many forms.</p></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a> <code class="docutils literal notranslate"><span class="pre">:</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Pair.html">Pair</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p>Such as in a hash or as a keyword argument</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">(</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> <code class="docutils literal notranslate"><span class="pre">)</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$ParenthesizedExpr.html">ParenthesizedExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">rescue</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$RescueClause.html">RescueClause</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a> <code class="docutils literal notranslate"><span class="pre">rescue</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$RescueModifierExpr.html">RescueModifierExpr</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a> TERM <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Statement.qll/type.Statement$Stmt.html">Stmt</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StmtSequence.html">StmtSequence</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p>A sequence of 0 or more statements, separated by semicolons or newlines</p></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringLiteral.html">StringLiteral</a> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Literal.qll/type.Literal$StringLiteral.html">StringLiteral</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$StringConcatenation.html">StringConcatenation</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Expr.qll/type.Expr$Expr.html">Expr</a></p></td>
|
|
<td><p>Implicit concatenation of consecutive string literals</p></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="variable-classes">
|
|
<h2>Variable classes<a class="headerlink" href="#variable-classes" title="Link to this heading">¶</a></h2>
|
|
<p>All classes in this subsection are subclasses of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableAccess.html">VariableAccess</a>.</p>
|
|
<table class="docutils align-default">
|
|
<thead>
|
|
<tr class="row-odd"><th class="head"><p>Example expression syntax</p></th>
|
|
<th class="head"><p>CodeQL class</p></th>
|
|
<th class="head"><p>Superclasses</p></th>
|
|
<th class="head"><p>Remarks</p></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">@@foo</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$ClassVariableReadAccess.html">ClassVariableReadAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableReadAccess.html">VariableReadAccess</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$ClassVariableAccess.html">ClassVariableAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">@@foo</span> <span class="pre">=</span> <span class="pre">'str'</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$ClassVariableWriteAccess.html">ClassVariableWriteAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableWriteAccess.html">VariableWriteAccess</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$ClassVariableAccess.html">ClassVariableAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">$foo</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$GlobalVariableReadAccess.html">GlobalVariableReadAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableReadAccess.html">VariableReadAccess</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$GlobalVariableAccess.html">GlobalVariableAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">$foo</span> <span class="pre">=</span> <span class="pre">'str'</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$GlobalVariableWriteAccess.html">GlobalVariableWriteAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableWriteAccess.html">VariableWriteAccess</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$GlobalVariableAccess.html">GlobalVariableAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">@foo</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$InstanceVariableReadAccess.html">InstanceVariableReadAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableReadAccess.html">VariableReadAccess</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$InstanceVariableAccess.html">InstanceVariableAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">@foo</span> <span class="pre">=</span> <span class="pre">'str'</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$InstanceVariableWriteAccess.html">InstanceVariableWriteAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableWriteAccess.html">VariableWriteAccess</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$InstanceVariableAccess.html">InstanceVariableAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">foo</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$LocalVariableReadAccess.html">LocalVariableReadAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableReadAccess.html">VariableReadAccess</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$LocalVariableAccess.html">LocalVariableAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">foo</span> <span class="pre">=</span> <span class="pre">'str'</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$LocalVariableWriteAccess.html">LocalVariableWriteAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableWriteAccess.html">VariableWriteAccess</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$LocalVariableAccess.html">LocalVariableAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">self</span></code></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$SelfVariableReadAccess.html">SelfVariableReadAccess</a></p></td>
|
|
<td><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$VariableReadAccess.html">VariableReadAccess</a>, <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Variable.qll/type.Variable$SelfVariableAccess.html">SelfVariableAccess</a></p></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section id="syntactic-sugar-and-desugaring">
|
|
<h2>Syntactic sugar and desugaring<a class="headerlink" href="#syntactic-sugar-and-desugaring" title="Link to this heading">¶</a></h2>
|
|
<p>Certain Ruby language features are shorthands for common operations that could also be expressed in other, more verbose, forms.
|
|
Such language features are typically referred to as “syntactic sugar”, and make it easier for programmers to write and read code. This is
|
|
great for programmers. For source code analyzers, however, this leads to additional work as they need to understand the shorthand notation as well as the long form. To make analysis easier, CodeQL automatically “desugars” Ruby code, effectively rewriting
|
|
rich syntactic constructs into equivalent code that uses simpler syntactic constructs.</p>
|
|
<p>For example, supposing that <code class="docutils literal notranslate"><span class="pre">x</span></code> is an object with an attribute <code class="docutils literal notranslate"><span class="pre">foo</span></code>, the assignment:</p>
|
|
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>x.foo = y
|
|
</pre></div>
|
|
</div>
|
|
<p>is desugared to code similar to:</p>
|
|
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>x.foo=(__synth_0 = y);
|
|
__synth_0;
|
|
</pre></div>
|
|
</div>
|
|
<p>In other words, there is effectively a call to the <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$SetterMethodCall.html">SetterMethodCall</a> <code class="docutils literal notranslate"><span class="pre">foo=</span></code> on <code class="docutils literal notranslate"><span class="pre">x</span></code> with argument <code class="docutils literal notranslate"><span class="pre">__synth_0</span> <span class="pre">=</span> <span class="pre">y</span></code>, followed by a read of the <code class="docutils literal notranslate"><span class="pre">__synth_0</span></code> variable.</p>
|
|
<p>In CodeQL, this is implemented by synthesizing <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/AST.qll/type.AST$AstNode.html">AstNode</a> instances corresponding to this desugared version of the code.</p>
|
|
<p>Note that the original <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignExpr.html">AssignExpr</a> and the desugared <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$SetterMethodCall.html">SetterMethodCall</a> versions are both available to use in CodeQL queries, and you do not usually need to be aware of any desugaring that may take place. However, if a codebase explicitly uses <code class="docutils literal notranslate"><span class="pre">x.foo=(y)</span></code> <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Call.qll/type.Call$SetterMethodCall.html">SetterMethodCall</a> syntax, you cannot find this syntax by searching for instances of <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/ast/Operation.qll/type.Operation$AssignExpr.html">AssignExpr</a> .</p>
|
|
<p>Other synthesized <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/AST.qll/type.AST$AstNode.html">AstNode</a> instances exist, see the <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/AST.qll/predicate.AST$AstNode$isSynthesized.0.html">isSynthesized</a> and <a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/codeql/ruby/AST.qll/predicate.AST$AstNode$getDesugared.0.html">getDesugared</a> predicates for details.</p>
|
|
<section id="further-reading">
|
|
<h3>Further reading<a class="headerlink" href="#further-reading" title="Link to this heading">¶</a></h3>
|
|
<ul class="simple">
|
|
<li><p><a class="reference external" href="https://github.com/github/codeql/tree/main/ruby/ql/src">CodeQL queries for Ruby</a></p></li>
|
|
<li><p><a class="reference external" href="https://github.com/github/codeql/tree/main/ruby/ql/examples">Example queries for Ruby</a></p></li>
|
|
<li><p><a class="reference external" href="https://codeql.github.com/codeql-standard-libraries/ruby/">CodeQL library reference for Ruby</a></p></li>
|
|
</ul>
|
|
<ul class="simple">
|
|
<li><p>“<a class="reference internal" href="../ql-language-reference/index.html#ql-language-reference"><span class="std std-ref">QL language reference</span></a>”</p></li>
|
|
<li><p>“<a class="reference internal" href="../codeql-overview/codeql-tools.html#codeql-tools"><span class="std std-ref">CodeQL tools</span></a>”</p></li>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
</article>
|
|
|
|
<!-- GitHub footer, with links to terms and privacy statement -->
|
|
<div class="px-3 px-md-6 f6 py-4 d-sm-flex flex-justify-between flex-row-reverse flex-items-center border-top">
|
|
<ul class="list-style-none d-flex flex-items-center mb-3 mb-sm-0 lh-condensed-ultra">
|
|
<li class="mr-3">
|
|
<a href="https://twitter.com/github" title="GitHub on Twitter" style="color: #959da5;">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 273.5 222.3" class="d-block" height="18">
|
|
<path
|
|
d="M273.5 26.3a109.77 109.77 0 0 1-32.2 8.8 56.07 56.07 0 0 0 24.7-31 113.39 113.39 0 0 1-35.7 13.6 56.1 56.1 0 0 0-97 38.4 54 54 0 0 0 1.5 12.8A159.68 159.68 0 0 1 19.1 10.3a56.12 56.12 0 0 0 17.4 74.9 56.06 56.06 0 0 1-25.4-7v.7a56.11 56.11 0 0 0 45 55 55.65 55.65 0 0 1-14.8 2 62.39 62.39 0 0 1-10.6-1 56.24 56.24 0 0 0 52.4 39 112.87 112.87 0 0 1-69.7 24 119 119 0 0 1-13.4-.8 158.83 158.83 0 0 0 86 25.2c103.2 0 159.6-85.5 159.6-159.6 0-2.4-.1-4.9-.2-7.3a114.25 114.25 0 0 0 28.1-29.1"
|
|
fill="currentColor"></path>
|
|
</svg>
|
|
</a>
|
|
</li>
|
|
<li class="mr-3">
|
|
<a href="https://www.facebook.com/GitHub" title="GitHub on Facebook" style="color: #959da5;">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.3 15.4" class="d-block" height="18">
|
|
<path
|
|
d="M14.5 0H.8a.88.88 0 0 0-.8.9v13.6a.88.88 0 0 0 .8.9h7.3v-6h-2V7.1h2V5.4a2.87 2.87 0 0 1 2.5-3.1h.5a10.87 10.87 0 0 1 1.8.1v2.1h-1.3c-1 0-1.1.5-1.1 1.1v1.5h2.3l-.3 2.3h-2v5.9h3.9a.88.88 0 0 0 .9-.8V.8a.86.86 0 0 0-.8-.8z"
|
|
fill="currentColor"></path>
|
|
</svg>
|
|
</a>
|
|
</li>
|
|
<li class="mr-3">
|
|
<a href="https://www.youtube.com/github" title="GitHub on YouTube" style="color: #959da5;">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.17 13.6" class="d-block" height="16">
|
|
<path
|
|
d="M18.77 2.13A2.4 2.4 0 0 0 17.09.42C15.59 0 9.58 0 9.58 0a57.55 57.55 0 0 0-7.5.4A2.49 2.49 0 0 0 .39 2.13 26.27 26.27 0 0 0 0 6.8a26.15 26.15 0 0 0 .39 4.67 2.43 2.43 0 0 0 1.69 1.71c1.52.42 7.5.42 7.5.42a57.69 57.69 0 0 0 7.51-.4 2.4 2.4 0 0 0 1.68-1.71 25.63 25.63 0 0 0 .4-4.67 24 24 0 0 0-.4-4.69zM7.67 9.71V3.89l5 2.91z"
|
|
fill="currentColor"></path>
|
|
</svg>
|
|
</a>
|
|
</li>
|
|
<li class="mr-3 flex-self-start">
|
|
<a href="https://www.linkedin.com/company/github" title="GitHub on Linkedin" style="color: #959da5;">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 18" class="d-block" height="18">
|
|
<path
|
|
d="M3.94 2A2 2 0 1 1 2 0a2 2 0 0 1 1.94 2zM4 5.48H0V18h4zm6.32 0H6.34V18h3.94v-6.57c0-3.66 4.77-4 4.77 0V18H19v-7.93c0-6.17-7.06-5.94-8.72-2.91z"
|
|
fill="currentColor"></path>
|
|
</svg>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/github" title="GitHub's organization" style="color: #959da5;">
|
|
<svg version="1.1" width="20" height="20" viewBox="0 0 16 16" class="octicon octicon-mark-github"
|
|
aria-hidden="true">
|
|
<path fill-rule="evenodd"
|
|
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z">
|
|
</path>
|
|
</svg>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<ul class="list-style-none d-flex text-gray">
|
|
<li class="mr-3">©
|
|
<script type="text/javascript">document.write(new Date().getFullYear());</script> GitHub, Inc.</li>
|
|
<li class="mr-3"><a
|
|
href="https://docs.github.com/github/site-policy/github-terms-of-service"
|
|
class="link-gray">Terms </a></li>
|
|
<li><a href="https://docs.github.com/github/site-policy/github-privacy-statement"
|
|
class="link-gray">Privacy </a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
$(".toggle > *").hide();
|
|
$(".toggle .name").show();
|
|
$(".toggle .name").click(function () {
|
|
$(this).parent().children().not(".name").toggle(400);
|
|
$(this).parent().children(".name").toggleClass("open");
|
|
})
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html> |