Skip to content

Commit e1dd213

Browse files
authored
Merge branch 'master' into max-fields-count
2 parents ef1adbd + a9e6ddc commit e1dd213

File tree

33 files changed

+547
-84
lines changed

33 files changed

+547
-84
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"type": "lua",
2727
"request": "attach",
2828
"stopOnEntry": false,
29-
"address": "127.0.0.1:11413",
29+
"address": "127.0.0.1:11414",
3030
"outputCapture": [
3131
],
3232
"sourceFormat": "string",

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
5+
* `NEW` Support Lua 5.5
56
* `FIX` Incorrect generation of function signatures with tuple-parameters
67
* `NEW` Doc output now contains file paths for `@alias` and `@enum` types
78
* `FIX` Typos in a few error messages.

locale/en-us/meta.lua

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,58 @@ cgopt.restart =
1515
cgopt.count =
1616
'Returns the total memory in Kbytes.'
1717
cgopt.step =
18-
'Performs a garbage-collection step.'
18+
[[
19+
Performs a garbage-collection step. This option may be followed by an integer `size`.
20+
If `size` is a positive n, the collector acts as if n new bytes have been allocated; if `size` is zero, the collector performs a basic step.
21+
In incremental mode, a basic step corresponds to the current step size; in generational mode, a basic step performs a full minor collection,
22+
or an incremental step if the collector has scheduled one.
23+
In incremental mode, the function returns `true` if the step finished a collection cycle; in generational mode, it returns `true` if the step finished a major collection.
24+
]]
1925
cgopt.setpause =
2026
'Set `pause`.'
2127
cgopt.setstepmul =
2228
'Set `step multiplier`.'
2329
cgopt.incremental =
24-
'Change the collector mode to incremental.'
30+
'Changes the collector mode to incremental and returns the previous mode (either `"generational"` or `"incremental"`).'
2531
cgopt.generational =
26-
'Change the collector mode to generational.'
32+
'Changes the collector mode to generational and returns the previous mode (either `"generational"` or `"incremental"`).'
2733
cgopt.param =
28-
'Changes and/or retrieves the values of a parameter of the collector. This option must be followed by one or two extra arguments: The name of the parameter and an optional new value.'
34+
[[
35+
Changes and/or retrieves the values of a collector parameter. This option must be followed by one or two extra arguments:
36+
the parameter name (a string) and an optional new value (an integer in the range [0,100000]).
37+
The call always returns the previous value of the parameter; if no new value is given, the value is left unchanged.
38+
Lua stores these values in a compressed format, so the value returned as the previous value may not be exactly the last value set.
39+
]]
40+
41+
gcparam.minormul =
42+
'The minor multiplier.'
43+
gcparam.majorminor =
44+
'The major-minor multiplier.'
45+
gcparam.minormajor =
46+
'The minor-major multiplier.'
47+
gcparam.pause =
48+
'The garbage-collector pause.'
49+
gcparam.stepmul =
50+
'The step multiplier.'
51+
gcparam.stepsize =
52+
'The step size.'
53+
2954
cgopt.isrunning =
3055
'Returns whether the collector is running.'
3156

3257
collectgarbage =
33-
'This function is a generic interface to the garbage collector. It performs different functions according to its first argument, `opt`.'
58+
[[
59+
Generic interface to the garbage collector. According to the first argument `opt`, it performs:
60+
• `"collect"`: Performs a full garbage-collection cycle (default option).
61+
• `"stop"`: Stops automatic execution of the collector; it runs only when explicitly invoked, until `"restart"`.
62+
• `"restart"`: Restarts automatic execution of the collector.
63+
• `"count"`: Returns the total memory in use by Lua in Kbytes (fractional; multiply by 1024 for bytes).
64+
• `"step"`: Performs a garbage-collection step; optional integer `size` controls behavior and return value (see `cgopt.step`).
65+
• `"isrunning"`: Returns whether the collector is running (i.e., not stopped).
66+
• `"incremental"`: Changes the mode to incremental and returns the previous mode.
67+
• `"generational"`: Changes the mode to generational and returns the previous mode.
68+
• `"param"`: Changes/reads collector parameters (see `gcparam.*`), always returns the previous value.
69+
]]
3470

3571
dofile =
3672
'Opens the named file and executes its content as a Lua chunk. When called without arguments, `dofile` executes the content of the standard input (`stdin`). Returns all values returned by the chunk. In case of errors, `dofile` propagates the error to its caller. (That is, `dofile` does not run in protected mode.)'

locale/en-us/script.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,18 @@ PARSER_MISS_EXPONENT =
237237
'Missed digits for the exponent.'
238238
PARSER_MISS_EXP =
239239
'<exp> expected.'
240+
PARSER_MISS_LOOP_MIN =
241+
'Missing start value of the loop.'
242+
PARSER_MISS_LOOP_MAX =
243+
'Missing limit value of the loop.'
240244
PARSER_MISS_FIELD =
241245
'<field> expected.'
242246
PARSER_MISS_METHOD =
243247
'<method> expected.'
244248
PARSER_ARGS_AFTER_DOTS =
245249
'`...` should be the last arg.'
250+
PARSER_UNSUPPORT_NAMED_VARARG =
251+
'`(...name)` syntax is supported in {version}.'
246252
PARSER_KEYWORD =
247253
'<keyword> cannot be used as name.'
248254
PARSER_EXP_IN_ACTION =
@@ -317,6 +323,8 @@ PARSER_LOCAL_LIMIT =
317323
'Only 200 active local variables and upvalues can be existed at the same time.'
318324
PARSER_VARIABLE_NOT_DECLARED =
319325
'Variable `{name}` is not declared. (Use `global *` to allow undefined variables, or declare it with `global {name}`)'
326+
PARSER_ENV_IS_GLOBAL =
327+
'_ENV is global when accessing variable `{name}`.'
320328
PARSER_ASSIGN_CONST_GLOBAL =
321329
'Cannot assign to const global variable `{name}`.'
322330
PARSER_LUADOC_MISS_CLASS_NAME =

locale/es-419/meta.lua

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,58 @@ cgopt.restart =
1515
cgopt.count =
1616
'Retorna el total de memoria en Kbytes.'
1717
cgopt.step =
18-
'Realiza un paso de recolección de basura.'
18+
[[
19+
Realiza un paso de recolección de basura. Esta opción puede seguirse por un entero `size`.
20+
Si `size` es un n positivo, el recolector actúa como si se hubieran asignado n nuevos bytes; si `size` es cero, realiza un paso básico.
21+
En modo incremental, un paso básico corresponde al tamaño de paso actual; en modo generacional, un paso básico realiza una recolección menor completa,
22+
o un paso incremental si el recolector ha agendado uno.
23+
En modo incremental, la función retorna `true` si el paso terminó un ciclo de recolección; en modo generacional, retorna `true` si el paso terminó una recolección mayor.
24+
]]
1925
cgopt.setpause =
2026
'Establece la pausa.'
2127
cgopt.setstepmul =
2228
'Establece el multiplicador para el paso de recolección de basura.'
2329
cgopt.incremental =
24-
'Cambia el modo de recolección a incremental.'
30+
'Cambia el modo del recolector a incremental y retorna el modo anterior (sea `"generational"` o `"incremental"`).'
2531
cgopt.generational =
26-
'Cambia el modo de recolección a generacional.'
32+
'Cambia el modo del recolector a generacional y retorna el modo anterior (sea `"generational"` o `"incremental"`).'
2733
cgopt.param =
28-
'Cambia y/o recupera los valores de un parámetro del recolector. Esta opción debe ser seguida por uno o dos argumentos extra: El nombre del parámetro y un nuevo valor opcional.'
34+
[[
35+
Cambia y/o recupera los valores de un parámetro del recolector. Esta opción debe ir seguida de uno o dos argumentos adicionales:
36+
el nombre del parámetro (una cadena) y un nuevo valor opcional (un entero en el rango [0,100000]).
37+
La llamada siempre retorna el valor anterior del parámetro; si no se da un nuevo valor, el valor se mantiene sin cambios.
38+
Lua almacena estos valores en un formato comprimido, por lo que el valor retornado como anterior puede no ser exactamente el último valor establecido.
39+
]]
40+
41+
gcparam.minormul =
42+
'El multiplicador menor.'
43+
gcparam.majorminor =
44+
'El multiplicador mayor-menor.'
45+
gcparam.minormajor =
46+
'El multiplicador menor-mayor.'
47+
gcparam.pause =
48+
'La pausa del recolector de basura.'
49+
gcparam.stepmul =
50+
'El multiplicador de paso.'
51+
gcparam.stepsize =
52+
'El tamaño del paso.'
53+
2954
cgopt.isrunning =
3055
'Retorna si el recolector está corriendo.'
3156

3257
collectgarbage =
33-
'Esta función es una interfaz genérica al recolector de basura. Realiza diferentes funcionalidades según su primer argumento `opt`'
58+
[[
59+
Interfaz genérica al recolector de basura. Según el primer argumento `opt`, realiza:
60+
• `"collect"`: Realiza un ciclo completo de recolección de basura (opción predeterminada).
61+
• `"stop"`: Detiene la ejecución automática; el recolector corre sólo cuando se invoca explícitamente, hasta `"restart"`.
62+
• `"restart"`: Reinicia la ejecución automática.
63+
• `"count"`: Retorna la memoria total usada por Lua en Kbytes (fraccionario; multiplique por 1024 para bytes).
64+
• `"step"`: Realiza un paso de recolección; entero opcional `size` controla el comportamiento y el retorno (vea `cgopt.step`).
65+
• `"isrunning"`: Retorna si el recolector está corriendo (es decir, no detenido).
66+
• `"incremental"`: Cambia el modo a incremental y retorna el modo anterior.
67+
• `"generational"`: Cambia el modo a generacional y retorna el modo anterior.
68+
• `"param"`: Cambia/lee parámetros del recolector (vea `gcparam.*`), siempre retorna el valor anterior.
69+
]]
3470

3571
dofile =
3672
'Abre el archivo mencionado y ejecuta su contenido como un bloque Lua. Cuando es llamada sin argumentos, `dofile` ejecuta el contenido de la entrada estándar (`stdin`). Retorna todos los valores retornado por el bloque. En caso de error `dofile` propaga el error a la función que la llama. (Eso sí, `dofile` no corre en modo protegido.)'

locale/es-419/script.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,18 @@ PARSER_MISS_EXPONENT =
231231
'Faltan los dígitos para el exponente.'
232232
PARSER_MISS_EXP =
233233
'Se esperaba <exp>.'
234+
PARSER_MISS_LOOP_MIN =
235+
'Falta el valor inicial del bucle.'
236+
PARSER_MISS_LOOP_MAX =
237+
'Falta el valor límite del bucle.'
234238
PARSER_MISS_FIELD =
235239
'Se esperaba <field>.'
236240
PARSER_MISS_METHOD =
237241
'Se esperaba <method>.'
238242
PARSER_ARGS_AFTER_DOTS =
239243
'`...` should be the last arg.'
244+
PARSER_UNSUPPORT_NAMED_VARARG =
245+
'La sintaxis `(...name)` es compatible con {version}.'
240246
PARSER_KEYWORD =
241247
'<keyword> cannot be used as name.'
242248
PARSER_EXP_IN_ACTION =
@@ -311,6 +317,8 @@ PARSER_LOCAL_LIMIT =
311317
'Solo 200 variables locales activas y valores anteriores pueden existir al mismo tiempo.'
312318
PARSER_VARIABLE_NOT_DECLARED =
313319
'Variable `{name}` no está declarada. (Use `global *` para permitir variables indefinidas, o declárela con `global {name}`)'
320+
PARSER_ENV_IS_GLOBAL =
321+
'_ENV es global al acceder a la variable `{name}`.'
314322
PARSER_ASSIGN_CONST_GLOBAL =
315323
'No se puede asignar a la variable global constante `{name}`.'
316324
PARSER_LUADOC_MISS_CLASS_NAME =

locale/ja-jp/meta.lua

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,58 @@ cgopt.restart =
1515
cgopt.count =
1616
'利用されているメモリ量の合計をキロバイト単位で返す。'
1717
cgopt.step =
18-
'ガベージコレクションのステップを実行する。'
18+
[[
19+
ガベージコレクションのステップを実行します。このオプションの後には整数 `size` を付けることができます。
20+
`size` が正の n の場合、コレクタは n バイトが新たに割り当てられたかのように動作します。`size` が 0 の場合、基本ステップを実行します。
21+
インクリメンタルモードでは、基本ステップは現在のステップサイズに対応します。世代別モードでは、基本ステップは完全なマイナー収集、
22+
またはコレクタがインクリメンタルステップを予定している場合はそのインクリメンタルステップを実行します。
23+
インクリメンタルモードでは、ステップが収集サイクルを完了した場合に `true` を返します。世代別モードでは、ステップがメジャー収集を完了した場合に `true` を返します。
24+
]]
1925
cgopt.setpause =
2026
'`pause` の値を設定する。'
2127
cgopt.setstepmul =
2228
'`step multiplier` の値を設定する。'
2329
cgopt.incremental =
24-
'ガベージコレクションのモードをインクリメンタルに変更する'
30+
'モードをインクリメンタルに変更し、以前のモード(`"generational"` または `"incremental"`)を返します'
2531
cgopt.generational =
26-
'ガベージコレクションのモードを世代別に変更する'
32+
'モードを世代別に変更し、以前のモード(`"generational"` または `"incremental"`)を返します'
2733
cgopt.param =
28-
'コレクターのパラメータの値を変更・取得する。この選択肢の後には1つまたは2つの追加引数が必要:パラメータ名と新しい値(オプション)。'
34+
[[
35+
コレクタのパラメータの値を変更/取得します。このオプションの後には 1 つまたは 2 つの追加引数が必要です:
36+
対象パラメータ名(文字列)と、オプションの新しい値([0,100000] の範囲の整数)。
37+
呼び出しは常にそのパラメータの「以前の値」を返します。新しい値が与えられない場合、値は変更されません。Lua はこれらの値を圧縮形式で保存するため、
38+
返される以前の値は最後に設定された値と完全には一致しない場合があります。
39+
]]
40+
41+
gcparam.minormul =
42+
'マイナー乗数。'
43+
gcparam.majorminor =
44+
'メジャー・マイナー乗数。'
45+
gcparam.minormajor =
46+
'マイナー・メジャー乗数。'
47+
gcparam.pause =
48+
'ガベージコレクターの一時停止。'
49+
gcparam.stepmul =
50+
'ステップ乗数。'
51+
gcparam.stepsize =
52+
'ステップサイズ。'
53+
2954
cgopt.isrunning =
3055
'ガベージコレクションが実行中かどうかを返す。'
3156

3257
collectgarbage =
33-
'この関数はガベージコレクション機能への汎用的なインターフェース。第一引数 `opt` に応じて異なる操作を実行する。'
58+
[[
59+
ガベージコレクタへの汎用インターフェース。第1引数 `opt` によって次を実行します:
60+
• `"collect"`: 完全なガベージコレクションサイクルを実行(デフォルト)。
61+
• `"stop"`: コレクタの自動実行を停止;`"restart"` まで明示的に呼び出したときのみ実行。
62+
• `"restart"`: コレクタの自動実行を再開。
63+
• `"count"`: Lua が使用しているメモリ総量を KBytes で返す(小数あり;1024 を掛けるとバイト数)。
64+
• `"step"`: ガベージコレクションのステップを実行;整数 `size` により動作と戻り値が制御される(`cgopt.step` 参照)。
65+
• `"isrunning"`: コレクタが実行中かどうか(停止されていないか)を返す。
66+
• `"incremental"`: インクリメンタルモードに変更し、以前のモードを返す。
67+
• `"generational"`: 世代別モードに変更し、以前のモードを返す。
68+
• `"param"`: コレクタのパラメータを変更/取得(`gcparam.*` 参照)。常に以前の値を返す。
69+
]]
3470

3571
dofile =
3672
'指定されたファイルを開き、その内容をLuaチャンクとして実行する。引数が指定されなかった場合、標準入力(`stdin`)の内容を実行する。チャンクによって返されたすべての値を返す。エラーが発生した場合、そのエラーが呼び出し元まで伝播される(つまり、`dofile` は保護モードでは実行されない)。'

locale/ja-jp/script.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,18 @@ PARSER_MISS_EXPONENT =
233233
'指数部が不足しています。'
234234
PARSER_MISS_EXP =
235235
'式が不足しています。'
236+
PARSER_MISS_LOOP_MIN =
237+
'ループの開始値が不足しています。'
238+
PARSER_MISS_LOOP_MAX =
239+
'ループの終了値が不足しています。'
236240
PARSER_MISS_FIELD =
237241
'フィールド/プロパティ名が不足しています。'
238242
PARSER_MISS_METHOD =
239243
'メソッド名が不足しています。'
240244
PARSER_ARGS_AFTER_DOTS =
241245
'`...` は最後の引数でなければなりません。'
246+
PARSER_UNSUPPORT_NAMED_VARARG =
247+
'`(...name)` 構文は {version} でサポートされています。'
242248
PARSER_KEYWORD =
243249
'キーワードは名前として使用できません。'
244250
PARSER_EXP_IN_ACTION =
@@ -313,6 +319,8 @@ PARSER_LOCAL_LIMIT =
313319
'同時に存在できるローカル変数とアップバリューの数は200個までです。'
314320
PARSER_VARIABLE_NOT_DECLARED =
315321
'変数 `{name}` は宣言されていません。(`global *` を使用して未定義の変数を許可するか、`global {name}` で宣言してください)'
322+
PARSER_ENV_IS_GLOBAL =
323+
'変数 `{name}` にアクセスする際、_ENV がグローバル変数です。'
316324
PARSER_ASSIGN_CONST_GLOBAL =
317325
'定数グローバル変数 `{name}` に代入できません。'
318326
PARSER_LUADOC_MISS_CLASS_NAME =

0 commit comments

Comments
 (0)