各言語ドキュメントの構文拡張を拡充
このコミットが含まれているのは:
8ファイル変更
+176
-18
検索条件に一致するファイルはありません
@@ -731,12 +731,32 @@
|
||||
قبل التنفيذ، لذلك تعمل بالطريقة نفسها على جميع المحركات. لا يجري تحويل ما
|
||||
بداخل السلاسل النصية والتعليقات.
|
||||
|
||||
○ is not
|
||||
تعامل a is not b كعلامة عدم مساواة، وتعني نفس معنى a ~= b.
|
||||
○ is / is not
|
||||
a is b تعني a == b، و a is not b تعني a ~= b.
|
||||
مثال: if frame is not 0 then
|
||||
obj.x = 100
|
||||
end
|
||||
|
||||
○ != / ! / && / ||
|
||||
!= تعني ~=، و ! تعني not، و && تعني and، و || تعني or.
|
||||
|
||||
○ الإسناد المركب (+= -= *= /= %= ^= ..=)
|
||||
x += 1 يتوسع إلى x = x + (1). و ..= لدمج السلاسل النصية.
|
||||
|
||||
○ ?? (دمج القيمة الفارغة)
|
||||
a ?? b يعيد b فقط عندما تكون a فارغة (nil)، ولا يرجع إلى false.
|
||||
|
||||
○ ??= / ||= / &&=
|
||||
x ??= b يسند فقط عندما تكون x فارغة (nil).
|
||||
x ||= b هو x = x or (b)، و x &&= b هو x = x and (b).
|
||||
|
||||
○ ++
|
||||
x++ يتوسع إلى x = x + 1. استخدمه كعبارة في سطر مستقل.
|
||||
|
||||
○ حلقة النطاق (<البداية..النهاية>)
|
||||
for i in <0..10> do مثل for i = 0, 10 do ويشمل النهاية.
|
||||
<0..<10> لا يشمل النهاية. <0..10, 2> يستخدم خطوة 2.
|
||||
|
||||
|
||||
- أمثلة على النصوص البرمجية -
|
||||
|
||||
|
||||
@@ -758,12 +758,32 @@
|
||||
transformed before execution, so they work the same on every engine.
|
||||
The insides of strings and comments are not transformed.
|
||||
|
||||
o is not
|
||||
a is not b is treated as an inequality and means the same as a ~= b.
|
||||
o is / is not
|
||||
a is b means a == b, and a is not b means a ~= b.
|
||||
Example: if frame is not 0 then
|
||||
obj.x = 100
|
||||
end
|
||||
|
||||
o != / ! / && / ||
|
||||
!= means ~=, ! means not, && means and, and || means or.
|
||||
|
||||
o Compound assignment (+= -= *= /= %= ^= ..=)
|
||||
x += 1 expands to x = x + (1). ..= concatenates strings.
|
||||
|
||||
o ?? (nil coalescing)
|
||||
a ?? b returns b only when a is nil. It does not fall back on false.
|
||||
|
||||
o ??= / ||= / &&=
|
||||
x ??= b assigns only when x is nil.
|
||||
x ||= b is x = x or (b), and x &&= b is x = x and (b).
|
||||
|
||||
o ++
|
||||
x++ expands to x = x + 1. Use it as a statement on its own line.
|
||||
|
||||
o Range for (<start..stop>)
|
||||
for i in <0..10> do is the same as for i = 0, 10 do and includes the end.
|
||||
<0..<10> excludes the end. <0..10, 2> uses a step of 2.
|
||||
|
||||
|
||||
- Script Examples -
|
||||
|
||||
|
||||
@@ -768,13 +768,32 @@
|
||||
transforma antes de ejecutarse, por lo que funcionan igual en todos los
|
||||
motores. El interior de las cadenas y los comentarios no se transforma.
|
||||
|
||||
o is not
|
||||
a is not b se trata como una desigualdad y significa lo mismo que
|
||||
a ~= b.
|
||||
o is / is not
|
||||
a is b significa a == b, y a is not b significa a ~= b.
|
||||
Ejemplo: if frame is not 0 then
|
||||
obj.x = 100
|
||||
end
|
||||
|
||||
o != / ! / && / ||
|
||||
!= significa ~=, ! significa not, && significa and y || significa or.
|
||||
|
||||
o Asignación compuesta (+= -= *= /= %= ^= ..=)
|
||||
x += 1 se expande a x = x + (1). ..= concatena cadenas.
|
||||
|
||||
o ?? (fusión de nil)
|
||||
a ?? b devuelve b solo cuando a es nil. No recurre a false.
|
||||
|
||||
o ??= / ||= / &&=
|
||||
x ??= b asigna solo cuando x es nil.
|
||||
x ||= b es x = x or (b), y x &&= b es x = x and (b).
|
||||
|
||||
o ++
|
||||
x++ se expande a x = x + 1. Úsalo como una sentencia en su propia línea.
|
||||
|
||||
o for de rango (<inicio..fin>)
|
||||
for i in <0..10> do es igual que for i = 0, 10 do e incluye el final.
|
||||
<0..<10> excluye el final. <0..10, 2> usa un incremento de 2.
|
||||
|
||||
|
||||
- Ejemplos de script -
|
||||
|
||||
|
||||
@@ -764,13 +764,32 @@
|
||||
ditransformasikan sebelum dijalankan, sehingga bekerja sama pada semua
|
||||
mesin. Bagian dalam string dan komentar tidak ditransformasikan.
|
||||
|
||||
o is not
|
||||
a is not b diperlakukan sebagai ketidaksamaan dan berarti sama
|
||||
dengan a ~= b.
|
||||
o is / is not
|
||||
a is b berarti a == b, dan a is not b berarti a ~= b.
|
||||
Contoh: if frame is not 0 then
|
||||
obj.x = 100
|
||||
end
|
||||
|
||||
o != / ! / && / ||
|
||||
!= berarti ~=, ! berarti not, && berarti and, dan || berarti or.
|
||||
|
||||
o Penugasan majemuk (+= -= *= /= %= ^= ..=)
|
||||
x += 1 diperluas menjadi x = x + (1). ..= menggabungkan string.
|
||||
|
||||
o ?? (koalesing nil)
|
||||
a ?? b mengembalikan b hanya saat a bernilai nil. Tidak beralih ke false.
|
||||
|
||||
o ??= / ||= / &&=
|
||||
x ??= b menetapkan hanya saat x bernilai nil.
|
||||
x ||= b adalah x = x or (b), dan x &&= b adalah x = x and (b).
|
||||
|
||||
o ++
|
||||
x++ diperluas menjadi x = x + 1. Gunakan sebagai pernyataan satu baris.
|
||||
|
||||
o for rentang (<awal..akhir>)
|
||||
for i in <0..10> do sama dengan for i = 0, 10 do dan menyertakan akhir.
|
||||
<0..<10> tidak menyertakan akhir. <0..10, 2> memakai langkah 2.
|
||||
|
||||
|
||||
- Contoh Skrip -
|
||||
|
||||
|
||||
@@ -735,12 +735,32 @@
|
||||
標準の Lua に無い記法を追加しています。実行前にスクリプトを変換するため、
|
||||
すべての実行エンジンで同じように使えます。文字列とコメントの内側は変換しません。
|
||||
|
||||
○is not
|
||||
a is not b は不等号として扱い、a ~= b と同じ意味になります。
|
||||
○is / is not
|
||||
a is b は a == b、a is not b は a ~= b と同じ意味になります。
|
||||
例:if frame is not 0 then
|
||||
obj.x = 100
|
||||
end
|
||||
|
||||
○!= / ! / && / ||
|
||||
!= は ~=、! は not、&& は and、|| は or と同じ意味になります。
|
||||
|
||||
○複合代入(+= -= *= /= %= ^= ..=)
|
||||
x += 1 は x = x + (1) に展開します。..= は文字列の連結です。
|
||||
|
||||
○??(nil 合体)
|
||||
a ?? b は a が nil のときだけ b を返します。false は返しません。
|
||||
|
||||
○??= / ||= / &&=
|
||||
x ??= b は x が nil のときだけ代入します。
|
||||
x ||= b は x = x or (b)、x &&= b は x = x and (b) です。
|
||||
|
||||
○++
|
||||
x++ は x = x + 1 に展開します。行単位の文として使います。
|
||||
|
||||
○範囲 for(<開始..終了>)
|
||||
for i in <0..10> do は for i = 0, 10 do と同じで終端を含みます。
|
||||
<0..<10> は終端を含みません。<0..10, 2> は増分 2 です。
|
||||
|
||||
|
||||
- スクリプト例 -
|
||||
|
||||
|
||||
@@ -728,12 +728,32 @@
|
||||
표준 Lua에 없는 표기를 추가했습니다. 스크립트는 실행 전에 변환되므로 모든
|
||||
엔진에서 동일하게 동작합니다. 문자열과 주석의 내부는 변환하지 않습니다.
|
||||
|
||||
○ is not
|
||||
a is not b는 부등호로 취급하며, a ~= b와 같은 의미입니다.
|
||||
○ is / is not
|
||||
a is b는 a == b, a is not b는 a ~= b와 같은 의미입니다.
|
||||
예: if frame is not 0 then
|
||||
obj.x = 100
|
||||
end
|
||||
|
||||
○ != / ! / && / ||
|
||||
!=는 ~=, !는 not, &&는 and, ||는 or와 같은 의미입니다.
|
||||
|
||||
○ 복합 대입 (+= -= *= /= %= ^= ..=)
|
||||
x += 1은 x = x + (1)로 확장됩니다. ..=는 문자열 연결입니다.
|
||||
|
||||
○ ?? (nil 병합)
|
||||
a ?? b는 a가 nil일 때만 b를 반환합니다. false로는 대체하지 않습니다.
|
||||
|
||||
○ ??= / ||= / &&=
|
||||
x ??= b는 x가 nil일 때만 대입합니다.
|
||||
x ||= b는 x = x or (b), x &&= b는 x = x and (b)입니다.
|
||||
|
||||
○ ++
|
||||
x++는 x = x + 1로 확장됩니다. 한 줄짜리 문으로 사용합니다.
|
||||
|
||||
○ 범위 for (<시작..끝>)
|
||||
for i in <0..10> do는 for i = 0, 10 do와 같으며 끝을 포함합니다.
|
||||
<0..<10>는 끝을 포함하지 않습니다. <0..10, 2>는 증분이 2입니다.
|
||||
|
||||
|
||||
- 스크립트 예 -
|
||||
|
||||
|
||||
@@ -704,12 +704,32 @@
|
||||
添加了标准 Lua 没有的写法。脚本在执行前会被转换,因此在所有引擎上表现一致。
|
||||
字符串和注释的内部不会被转换。
|
||||
|
||||
○ is not
|
||||
a is not b 作为不等号处理,与 a ~= b 含义相同。
|
||||
○ is / is not
|
||||
a is b 与 a == b 相同,a is not b 与 a ~= b 相同。
|
||||
示例:if frame is not 0 then
|
||||
obj.x = 100
|
||||
end
|
||||
|
||||
○ != / ! / && / ||
|
||||
!= 相当于 ~=,! 相当于 not,&& 相当于 and,|| 相当于 or。
|
||||
|
||||
○ 复合赋值(+= -= *= /= %= ^= ..=)
|
||||
x += 1 展开为 x = x + (1)。..= 用于字符串连接。
|
||||
|
||||
○ ??(nil 合并)
|
||||
a ?? b 仅当 a 为 nil 时返回 b。不会因 false 而回退。
|
||||
|
||||
○ ??= / ||= / &&=
|
||||
x ??= b 仅当 x 为 nil 时赋值。
|
||||
x ||= b 即 x = x or (b),x &&= b 即 x = x and (b)。
|
||||
|
||||
○ ++
|
||||
x++ 展开为 x = x + 1。作为独立一行的语句使用。
|
||||
|
||||
○ 范围 for(<起始..结束>)
|
||||
for i in <0..10> do 与 for i = 0, 10 do 相同,包含结束值。
|
||||
<0..<10> 不包含结束值。<0..10, 2> 的步长为 2。
|
||||
|
||||
|
||||
- 脚本示例 -
|
||||
|
||||
|
||||
@@ -705,12 +705,32 @@
|
||||
新增了標準 Lua 沒有的寫法。腳本在執行前會被轉換,因此在所有引擎上表現一致。
|
||||
字串與註解的內部不會被轉換。
|
||||
|
||||
○ is not
|
||||
a is not b 會當作不等號處理,與 a ~= b 意義相同。
|
||||
○ is / is not
|
||||
a is b 與 a == b 相同,a is not b 與 a ~= b 相同。
|
||||
範例:if frame is not 0 then
|
||||
obj.x = 100
|
||||
end
|
||||
|
||||
○ != / ! / && / ||
|
||||
!= 相當於 ~=,! 相當於 not,&& 相當於 and,|| 相當於 or。
|
||||
|
||||
○ 複合指派(+= -= *= /= %= ^= ..=)
|
||||
x += 1 會展開為 x = x + (1)。..= 用於字串連接。
|
||||
|
||||
○ ??(nil 合併)
|
||||
a ?? b 僅在 a 為 nil 時回傳 b。不會因 false 而回退。
|
||||
|
||||
○ ??= / ||= / &&=
|
||||
x ??= b 僅在 x 為 nil 時指派。
|
||||
x ||= b 即 x = x or (b),x &&= b 即 x = x and (b)。
|
||||
|
||||
○ ++
|
||||
x++ 會展開為 x = x + 1。作為獨立一行的敘述使用。
|
||||
|
||||
○ 範圍 for(<起始..結束>)
|
||||
for i in <0..10> do 與 for i = 0, 10 do 相同,包含結束值。
|
||||
<0..<10> 不包含結束值。<0..10, 2> 的步長為 2。
|
||||
|
||||
|
||||
- 腳本範例 -
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする