mention set literals in handbook

This commit is contained in:
Philip Ginsbach
2020-03-27 11:51:03 +00:00
parent 0f70da2258
commit 8e873f35ac

View File

@@ -95,9 +95,27 @@ In a valid range, the start and end expression are integers, floats, or dates. I
is a date, then both must be dates. If one of them is an integer and the other a float, then
both are treated as floats.
.. index:: setliteral
.. _setliteral:
Set literal expressions
***********************
A set literal expression allows the explicit listing of a choice between several values.
It consists of a comma-separated collection of expressions that are enclosed in brackets (``[`` and ``]``).
For example, ``[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]`` is a valid set literal expression.
Its values are the first ten prime numbers.
The values of the contained expressions need to be of compatible types for a valid set literal expression.
Specifically, at least one of the set elements has to be of a type that is a supertype of the types of all
the other contained expressions.
Set literals are supported from release 2.1.0 of the CodeQL CLI, and release 1.24 of LGTM Enterprise.
.. index:: super
.. _super:
Super expressions
*****************