Skip to content

Commit 0d178e1

Browse files
authored
Merge pull request #2178 from carsakiller/add-luadoc-desc-source
add: description for `@source`
2 parents 5c4f5b2 + c5e58f8 commit 0d178e1

File tree

4 files changed

+108
-0
lines changed

4 files changed

+108
-0
lines changed

locale/en-us/script.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,33 @@ local function setColor(color) end
11991199
setColor(colors.green)
12001200
```
12011201
]=]
1202+
LUADOC_DESC_SOURCE =
1203+
[=[
1204+
Provide a reference to some source code which lives in another file. When
1205+
searching for the defintion of an item, its `@source` will be used.
1206+
1207+
## Syntax
1208+
`@source <path>`
1209+
1210+
## Usage
1211+
```
1212+
---You can use absolute paths
1213+
---@source C:/Users/me/Documents/program/myFile.c
1214+
local a
1215+
1216+
---Or URIs
1217+
---@source file:///C:/Users/me/Documents/program/myFile.c:10
1218+
local b
1219+
1220+
---Or relative paths
1221+
---@source local/file.c
1222+
local c
1223+
1224+
---You can also include line and char numbers
1225+
---@source local/file.c:10:8
1226+
local d
1227+
```
1228+
]=]
12021229
LUADOC_DESC_PACKAGE =
12031230
[=[
12041231
Mark a function as private to the file it is defined in. A packaged function

locale/pt-br/script.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,33 @@ local function setColor(color) end
11991199
setColor(colors.green)
12001200
```
12011201
]=]
1202+
LUADOC_DESC_SOURCE = -- TODO: need translate!
1203+
[=[
1204+
Provide a reference to some source code which lives in another file. When
1205+
searching for the defintion of an item, its `@source` will be used.
1206+
1207+
## Syntax
1208+
`@source <path>`
1209+
1210+
## Usage
1211+
```
1212+
---You can use absolute paths
1213+
---@source C:/Users/me/Documents/program/myFile.c
1214+
local a
1215+
1216+
---Or URIs
1217+
---@source file:///C:/Users/me/Documents/program/myFile.c:10
1218+
local b
1219+
1220+
---Or relative paths
1221+
---@source local/file.c
1222+
local c
1223+
1224+
---You can also include line and char numbers
1225+
---@source local/file.c:10:8
1226+
local d
1227+
```
1228+
]=]
12021229
LUADOC_DESC_PACKAGE = -- TODO: need translate!
12031230
[=[
12041231
Mark a function as private to the file it is defined in. A packaged function

locale/zh-cn/script.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,33 @@ local function setColor(color) end
11991199
setColor(colors.green)
12001200
```
12011201
]=]
1202+
LUADOC_DESC_SOURCE = -- TODO: need translate!
1203+
[=[
1204+
Provide a reference to some source code which lives in another file. When
1205+
searching for the defintion of an item, its `@source` will be used.
1206+
1207+
## Syntax
1208+
`@source <path>`
1209+
1210+
## Usage
1211+
```
1212+
---You can use absolute paths
1213+
---@source C:/Users/me/Documents/program/myFile.c
1214+
local a
1215+
1216+
---Or URIs
1217+
---@source file:///C:/Users/me/Documents/program/myFile.c:10
1218+
local b
1219+
1220+
---Or relative paths
1221+
---@source local/file.c
1222+
local c
1223+
1224+
---You can also include line and char numbers
1225+
---@source local/file.c:10:8
1226+
local d
1227+
```
1228+
]=]
12021229
LUADOC_DESC_PACKAGE = -- TODO: need translate!
12031230
[=[
12041231
Mark a function as private to the file it is defined in. A packaged function

locale/zh-tw/script.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,33 @@ local function setColor(color) end
11931193
setColor(colors.green)
11941194
```
11951195
]=]
1196+
LUADOC_DESC_SOURCE = -- TODO: need translate!
1197+
[=[
1198+
Provide a reference to some source code which lives in another file. When
1199+
searching for the defintion of an item, its `@source` will be used.
1200+
1201+
## Syntax
1202+
`@source <path>`
1203+
1204+
## Usage
1205+
```
1206+
---You can use absolute paths
1207+
---@source C:/Users/me/Documents/program/myFile.c
1208+
local a
1209+
1210+
---Or URIs
1211+
---@source file:///C:/Users/me/Documents/program/myFile.c:10
1212+
local b
1213+
1214+
---Or relative paths
1215+
---@source local/file.c
1216+
local c
1217+
1218+
---You can also include line and char numbers
1219+
---@source local/file.c:10:8
1220+
local d
1221+
```
1222+
]=]
11961223
LUADOC_DESC_PACKAGE = -- TODO: need translate!
11971224
[=[
11981225
Mark a function as private to the file it is defined in. A packaged function

0 commit comments

Comments
 (0)