summaryrefslogtreecommitdiff
path: root/locale/pt-br/script.lua
diff options
context:
space:
mode:
Diffstat (limited to 'locale/pt-br/script.lua')
-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)
+```
+]=]