You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: demonstrate union type inference in else
* docs: reflect Lua 5.5 compiler options and variable attributes
* docs: 5.5-style named varags (introduced in #1122)
* docs: missing word
* docs: named varargs should always be read-only (see #1160)
Copy file name to clipboardExpand all lines: docs/src/compiler_options.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ return {
24
24
| `-I --include-dir` | `include_dir` | `{string}` | `check``gen``run` | Prepend this directory to the module search path.
25
25
| | `source_dir` | `string` | `check``gen``run` | Set the project source directory and add it to the module search path.
26
26
| `--gen-compat` | `gen_compat` | `string` | `gen``run` | Generate compatibility code for targeting different Lua VM versions. See [below](#generated-code) for details.
27
-
| `--gen-target` | `gen_target` | `string` | `gen``run` | Minimum targeted Lua version for generated code. Options are `5.1`, `5.3`and `5.4`. See [below](#generated-code) for details.
27
+
| `--gen-target` | `gen_target` | `string` | `gen``run` | Minimum targeted Lua version for generated code. Options are `5.1`, `5.3`, `5.4`and `5.5`. See [below](#generated-code) for details.
28
28
| `--keep-hashbang` | | | `gen` | Preserve hashbang line (`#!`) at the top of file if present.
29
29
| `-p --pretend` | | | `gen` | Don't compile/write to any files, but type check and log what files would be written to.
30
30
| `--wdisable` | `disable_warnings` | `{string}` | `check``run` | Disable the given warnings.
@@ -39,7 +39,7 @@ such as `src` without repeating that directory in `include_dir`; any explicit
39
39
40
40
### Generated code
41
41
42
-
Teal is a Lua dialect that most closely resembles Lua 5.3-5.4, but it is able
42
+
Teal is a Lua dialect that most closely resembles Lua 5.3–5.5, but it is able
43
43
to target Lua 5.1 (including LuaJIT) and Lua 5.2 as well. The compiler attempts
44
44
to produce code that, given an input `.tl` file, generates the same behavior
45
45
on various Lua versions.
@@ -60,7 +60,7 @@ library for bitwise operators.
60
60
61
61
Using `5.3`, Teal will generate code using the native `//` and bitwise operators.
62
62
63
-
The option`5.4`is equivalent to `5.3`, but it also allows using the `<close>`
63
+
The options`5.4`and `5.5` are equivalent to `5.3`, but also allow using the `<close>`
64
64
variable annotation. Since that is incompatible with other Lua versions, using
65
65
this option requires using `--gen-compat=off`.
66
66
@@ -76,7 +76,7 @@ target implicitly.
76
76
77
77
If set explicitly via the `--gen-target` flag of the `tl` CLI (or the equivalent
78
78
options in the programmatic API), the generated code will target the Lua
79
-
version requested: 5.1, 5.3or 5.4.
79
+
version requested: 5.1, 5.3, 5.4 or 5.5.
80
80
81
81
If the code generation target is not set explicitly via `--gen-target`, Teal
82
82
will target the Lua version most compatible with the version of the Lua VM
0 commit comments