Skip to content

Commit e0e9535

Browse files
authored
Merge pull request github#3530 from jf205/sd-109
CodeQL docs: refine two article titles
2 parents cca3922 + edc5d36 commit e0e9535

File tree

8 files changed

+16
-11
lines changed

8 files changed

+16
-11
lines changed

docs/language/learn-ql/java/ast-class-reference.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
Classes for working with Java code
2-
==================================
1+
Abstract syntax tree classes for working with Java programs
2+
===========================================================
33

4-
CodeQL has a large selection of classes for working with Java statements and expressions.
4+
CodeQL has a large selection of classes for representing the abstract syntax tree of Java programs.
5+
6+
.. include:: ../../reusables/abstract-syntax-tree.rst
57

68
.. _Expr: https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$Expr.html
79
.. _Stmt: https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$Stmt.html

docs/language/learn-ql/java/expressions-statements.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If ``l`` is bigger than 2\ :sup:`31`\ - 1 (the largest positive value of type ``
2626

2727
All primitive numeric types have a maximum value, beyond which they will wrap around to their lowest possible value (called an "overflow"). For ``int``, this maximum value is 2\ :sup:`31`\ - 1. Type ``long`` can accommodate larger values up to a maximum of 2\ :sup:`63`\ - 1. In this example, this means that ``l`` can take on a value that is higher than the maximum for type ``int``; ``i`` will never be able to reach this value, instead overflowing and returning to a low value.
2828

29-
We're going to develop a query that finds code that looks like it might exhibit this kind of behavior. We'll be using several of the standard library classes for representing statements and functions. For a full list, see :doc:`Classes for working with Java code <ast-class-reference>`.
29+
We're going to develop a query that finds code that looks like it might exhibit this kind of behavior. We'll be using several of the standard library classes for representing statements and functions. For a full list, see :doc:`Abstract syntax tree classes for working with Java programs <ast-class-reference>`.
3030

3131
Initial query
3232
-------------

docs/language/learn-ql/java/introduce-libraries-java.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Class ``Variable`` represents a variable `in the Java sense <http://docs.oracle.
210210
Abstract syntax tree
211211
--------------------
212212

213-
Classes in this category represent abstract syntax tree (AST) nodes, that is, statements (class ``Stmt``) and expressions (class ``Expr``). For a full list of expression and statement types available in the standard QL library, see :doc:`Classes for working with Java code <ast-class-reference>`.
213+
Classes in this category represent abstract syntax tree (AST) nodes, that is, statements (class ``Stmt``) and expressions (class ``Expr``). For a full list of expression and statement types available in the standard QL library, see :doc:`Abstract syntax tree classes for working with Java programs <ast-class-reference>`.
214214

215215
Both ``Expr`` and ``Stmt`` provide member predicates for exploring the abstract syntax tree of a program:
216216

docs/language/learn-ql/java/ql-for-java.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
3434

3535
- :doc:`Working with source locations <source-locations>`: You can use the ___location of entities within Java code to look for potential errors. Locations allow you to deduce the presence, or absence, of white space which, in some cases, may indicate a problem.
3636

37-
- :doc:`Classes for working with Java code <ast-class-reference>`: CodeQL has a large selection of classes for working with Java statements and expressions.
37+
- :doc:`Abstract syntax tree classes for working with Java programs <ast-class-reference>`: CodeQL has a large selection of classes for representing the abstract syntax tree of Java programs.
3838

docs/language/learn-ql/javascript/ast-class-reference.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
Abstract syntax tree classes for JavaScript and TypeScript
2-
==========================================================
1+
Abstract syntax tree classes for working with JavaScript and TypeScript programs
2+
================================================================================
33

4-
CodeQL has a large selection of classes for working with JavaScript and TypeScript statements and expressions.
4+
CodeQL has a large selection of classes for representing the abstract syntax tree of JavaScript and TypeScript programs.
5+
6+
.. include:: ../../reusables/abstract-syntax-tree.rst
57

68
Statement classes
79
-----------------

docs/language/learn-ql/javascript/dataflow-cheat-sheet.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Files
142142
AST nodes
143143
---------
144144

145-
See also: :doc:`Abstract syntax tree classes for JavaScript and TypeScript <ast-class-reference>`.
145+
See also: :doc:`Abstract syntax tree classes for working with JavaScript and TypeScript programs <ast-class-reference>`.
146146

147147
Conversion between DataFlow and AST nodes:
148148

docs/language/learn-ql/javascript/ql-for-javascript.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
2626

2727
- :doc:`Using type tracking for API modeling <type-tracking>`: You can track data through an API by creating a model using the CodeQL type-tracking library for JavaScript.
2828

29-
- :doc:`Abstract syntax tree classes for JavaScript and TypeScript <ast-class-reference>`: CodeQL has a large selection of classes for working with JavaScript and TypeScript statements and expressions.
29+
- :doc:`Abstract syntax tree classes for working with JavaScript and TypeScript programs <ast-class-reference>`: CodeQL has a large selection of classes for representing the abstract syntax tree of JavaScript and TypeScript programs.
3030

3131
- :doc:`Data flow cheat sheet for JavaScript <dataflow-cheat-sheet>`: This article describes parts of the JavaScript libraries commonly used for variant analysis and in data flow queries.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The `abstract syntax tree (AST) <https://en.wikipedia.org/wiki/Abstract_syntax_tree>`__ represents the syntactic structure of a program. Nodes on the AST represent elements such as statements and expressions.

0 commit comments

Comments
 (0)