diff options
| -rw-r--r-- | src/luarocks/core/dir.tl | 8 | ||||
| -rw-r--r-- | src/luarocks/core/persist.tl | 5 | ||||
| -rw-r--r-- | src/luarocks/core/sysdetect.tl | 16 | ||||
| -rw-r--r-- | src/luarocks/core/util.tl | 13 | ||||
| -rw-r--r-- | src/luarocks/core/vers.tl | 11 |
5 files changed, 46 insertions, 7 deletions
diff --git a/src/luarocks/core/dir.tl b/src/luarocks/core/dir.tl index 55604e64..4786290e 100644 --- a/src/luarocks/core/dir.tl +++ b/src/luarocks/core/dir.tl | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | -- local dir = {} --! | ||
| 1 | 2 | ||
| 2 | local dir = {} --! | 3 | local record dir |
| 4 | unquote: function(c: string): string --! dir.unquote | ||
| 5 | path: function(...: string): string | ||
| 6 | split_url: function(url: string): string, string | ||
| 7 | normalize: function(name: string): string | ||
| 8 | end | ||
| 3 | 9 | ||
| 4 | local require = nil --! | 10 | local require = nil --! |
| 5 | -------------------------------------------------------------------------------- | 11 | -------------------------------------------------------------------------------- |
diff --git a/src/luarocks/core/persist.tl b/src/luarocks/core/persist.tl index 67b5c8dd..26eb5dff 100644 --- a/src/luarocks/core/persist.tl +++ b/src/luarocks/core/persist.tl | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 1 | ||
| 2 | local persist = {} | 2 | local record persist |
| 3 | run_file: function(filename: string, env: {string:any}): boolean, any | nil, string, string | ||
| 4 | load_into_table: function(filename: string, tbl: {string:any}) : table, table | nil, string, string | ||
| 5 | end | ||
| 3 | 6 | ||
| 4 | local require = nil --! | 7 | local require = nil --! |
| 5 | -------------------------------------------------------------------------------- | 8 | -------------------------------------------------------------------------------- |
diff --git a/src/luarocks/core/sysdetect.tl b/src/luarocks/core/sysdetect.tl index ee2a5bf7..e783a012 100644 --- a/src/luarocks/core/sysdetect.tl +++ b/src/luarocks/core/sysdetect.tl | |||
| @@ -46,12 +46,26 @@ local record sysdetect | |||
| 46 | "cygwin" | 46 | "cygwin" |
| 47 | "macosx" | 47 | "macosx" |
| 48 | end | 48 | end |
| 49 | |||
| 50 | hex: function(s: string): string --? | ||
| 51 | read_int8: function(fd: FILE): integer | ||
| 52 | bytes2number: function(s: string, endian: Endian): integer | ||
| 53 | read: function(fd: FILE, bytes: integer, endian: Endian): integer | ||
| 54 | read_int32le: function(fd: FILE): integer | ||
| 55 | read_elf_section_headers: function(fd: FILE, hdr: ElfHeader): {string: ElfSection} | ||
| 56 | detect_elf_system: function(fd: FILE, hdr: ElfHeader, sections: {string:ElfSection}): System | ||
| 57 | read_elf_header: function(fd: FILE): ElfHeader, Processor | ||
| 58 | detect_elf: function(fd: FILE): System, Processor | ||
| 59 | detect_mach: function(magic: string, fd: FILE): System, Processor | ||
| 60 | detect_pe: function(fd: FILE): System, Processor | ||
| 61 | detect_file: function(file: string): System, Processor --? systemdetect.detect_file? | ||
| 62 | detect: function(input_file: string): System, Processor | ||
| 49 | end | 63 | end |
| 50 | 64 | ||
| 51 | local type System = sysdetect.System --? ? | 65 | local type System = sysdetect.System --? ? |
| 52 | local type Processor = sysdetect.Processor --? ? | 66 | local type Processor = sysdetect.Processor --? ? |
| 53 | 67 | ||
| 54 | local enum Endian | 68 | local enum Endian --? in the registry and a line for type ? |
| 55 | "little" | 69 | "little" |
| 56 | "big" | 70 | "big" |
| 57 | end | 71 | end |
diff --git a/src/luarocks/core/util.tl b/src/luarocks/core/util.tl index 5fd423a9..c7f02de2 100644 --- a/src/luarocks/core/util.tl +++ b/src/luarocks/core/util.tl | |||
| @@ -1,5 +1,16 @@ | |||
| 1 | 1 | ||
| 2 | local util = {} | 2 | local record util |
| 3 | popen_read: function(cmd: string, spec: string): string --? util.popen_read | ||
| 4 | show_table: function(t: {any:any}, tname: string, top_indent: string): string | ||
| 5 | deep_merge: function(dst: {integer: any}, src: {integer: any}) | ||
| 6 | deep_merge_under: function(dst: {integer: any}, src: {integer: any}) | ||
| 7 | cleanup_path: function(list: string, sep: string, lua_version: string, keep_first: boolean): string | ||
| 8 | split_string: function(str: string, delim: string, maxNb: number): {string} | ||
| 9 | keys: function(tbl: {any:any}): {any} | ||
| 10 | printerr: function(...: string | number) | ||
| 11 | warning: function(msg: string) | ||
| 12 | sortedpairs: function(tbl: {any: any}, sort_function: function<any>(any, any): boolean | {any:any} | nil): function | ||
| 13 | end | ||
| 3 | 14 | ||
| 4 | local require = nil --! | 15 | local require = nil --! |
| 5 | -------------------------------------------------------------------------------- | 16 | -------------------------------------------------------------------------------- |
diff --git a/src/luarocks/core/vers.tl b/src/luarocks/core/vers.tl index fd1e5acb..1940d7fb 100644 --- a/src/luarocks/core/vers.tl +++ b/src/luarocks/core/vers.tl | |||
| @@ -1,7 +1,12 @@ | |||
| 1 | 1 | ||
| 2 | local vers = {} | 2 | local record vers |
| 3 | -- version_mt: {__eq: function, __lt: function, __le: function, __tostring: function} --! version_mt? | ||
| 4 | parse_version: function(vstring: string): Version | nil | ||
| 5 | compare_versions: function(a: string, b: string): boolean | ||
| 6 | match_constraints: function(version: Version, constraints: Version): boolean | ||
| 7 | end | ||
| 3 | 8 | ||
| 4 | local util <const> = require("luarocks.core.util") --! | 9 | local util = require("luarocks.core.util") --! <const>?? |
| 5 | local require = nil --! | 10 | local require = nil --! |
| 6 | -------------------------------------------------------------------------------- | 11 | -------------------------------------------------------------------------------- |
| 7 | 12 | ||
| @@ -21,7 +26,7 @@ local record Version --? | |||
| 21 | number: {number} | 26 | number: {number} |
| 22 | end | 27 | end |
| 23 | 28 | ||
| 24 | local version_mt = { | 29 | local version_mt = { --? version_mt? |
| 25 | --- Equality comparison for versions. | 30 | --- Equality comparison for versions. |
| 26 | -- All version numbers must be equal. | 31 | -- All version numbers must be equal. |
| 27 | -- If both versions have revision numbers, they must be equal; | 32 | -- If both versions have revision numbers, they must be equal; |
