summaryrefslogtreecommitdiff
path: root/locale/pt-br
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-19 11:22:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-19 11:22:56 +0800
commit67301c33eafa7a46a8b6e05fec8aac27539f4a05 (patch)
tree362ec6773488cd1a3893e003bd720cb1c071474c /locale/pt-br
parentac76b0c5013874038e19628988742b75253a8be2 (diff)
downloadlua-language-server-67301c33eafa7a46a8b6e05fec8aac27539f4a05.zip
build locale
Diffstat (limited to 'locale/pt-br')
-rw-r--r--locale/pt-br/script.lua57
1 files changed, 57 insertions, 0 deletions
diff --git a/locale/pt-br/script.lua b/locale/pt-br/script.lua
index b9cf0f7d..4804a646 100644
--- a/locale/pt-br/script.lua
+++ b/locale/pt-br/script.lua
@@ -1022,3 +1022,60 @@ print(x) --> table
---
[View Wiki](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#cast)
]=]
+LUADOC_DESC_OPERATOR = -- TODO: need translate!
+[=[
+Provide type declaration for [operator metamethods](http://lua-users.org/wiki/MetatableEvents).
+
+## Syntax
+`@operator <operation>[(input_type)]:<resulting_type>`
+
+## Usage
+### Vector Add Metamethod
+```
+---@class Vector
+---@operation add(Vector):Vector
+
+vA = Vector.new(1, 2, 3)
+vB = Vector.new(10, 20, 30)
+
+vC = vA + vB
+--> Vector
+```
+### Unary Minus
+```
+---@class Passcode
+---@operation unm:integer
+
+pA = Passcode.new(1234)
+pB = -pA
+--> integer
+```
+[View Request](https://github.com/sumneko/lua-language-server/issues/599)
+]=]
+LUADOC_DESC_ENUM = -- TODO: need translate!
+[=[
+Mark a table as an enum. If you want an enum but can't define it as a Lua
+table, take a look at the [`@alias`](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#alias)
+tag.
+
+## Syntax
+`@enum <name>`
+
+## Usage
+```
+---@enum colors
+local colors = {
+ white = 0,
+ orange = 2,
+ yellow = 4,
+ green = 8,
+ black = 16,
+}
+
+---@param color colors
+local function setColor(color) end
+
+-- Completion and hover is provided for the below param
+setColor(colors.green)
+```
+]=]