Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add buffer library to Luau standard library #566

Merged
merged 5 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Added `no-exclude` cli flag to disable excludes.
- When given in standard library format, additional information now shows up in `incorrect_standard_library_use` missing required parameter errors.
- Added new [`mixed_table` lint](https://kampfkarren.github.io/selene/lints/mixed_table.html), which will warn against mixed tables.
- Added `buffer` library to Luau standard library

### Fixed
- `string.pack` and `string.unpack` now have proper function signatures in the Lua 5.3 standard library.
Expand Down
148 changes: 148 additions & 0 deletions selene-lib/default_std/luau.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,154 @@ globals:
- type: number
- type: number
must_use: true
buffer.create:
args:
- type: number
must_use: true
buffer.copy:
Dekkonot marked this conversation as resolved.
Show resolved Hide resolved
args:
- type:
display: buffer
- type: number
- type:
display: buffer
- required: false
type: number
- required: false
type: number
buffer.fill:
args:
- type:
display: buffer
- type: number
- type: number
- required: false
type: number
buffer.fromstring:
args:
- type: string
must_use: true
buffer.len:
args:
- type:
display: buffer
must_use: true
buffer.readi8:
args:
- type:
display: buffer
- type: number
must_use: true
buffer.readi16:
args:
- type:
display: buffer
- type: number
must_use: true
buffer.readi32:
args:
- type:
display: buffer
- type: number
must_use: true
buffer.readf32:
Dekkonot marked this conversation as resolved.
Show resolved Hide resolved
args:
- type:
display: buffer
- type: number
must_use: true
buffer.readf64:
args:
- type:
display: buffer
- type: number
must_use: true
buffer.readu8:
args:
- type:
display: buffer
- type: number
must_use: true
buffer.readu16:
args:
- type:
display: buffer
- type: number
must_use: true
buffer.readu32:
args:
- type:
display: buffer
- type: number
must_use: true
buffer.readstring:
Dekkonot marked this conversation as resolved.
Show resolved Hide resolved
args:
- type:
display: buffer
- type: number
- type: number
must_use: true
buffer.tostring:
args:
- type:
display: buffer
must_use: true
buffer.writei8:
args:
- type:
display: buffer
- type: number
- type: number
buffer.writei16:
args:
- type:
display: buffer
- type: number
- type: number
buffer.writei32:
args:
- type:
display: buffer
- type: number
- type: number
buffer.writef32:
Dekkonot marked this conversation as resolved.
Show resolved Hide resolved
args:
- type:
display: buffer
- type: number
- type: number
buffer.writef64:
args:
- type:
display: buffer
- type: number
- type: number
buffer.writeu8:
args:
- type:
display: buffer
- type: number
- type: number
buffer.writeu16:
args:
- type:
display: buffer
- type: number
- type: number
buffer.writeu32:
args:
- type:
display: buffer
- type: number
- type: number
buffer.writestring:
Dekkonot marked this conversation as resolved.
Show resolved Hide resolved
args:
- type:
display: buffer
- type: number
- type: string
- required: false
type: number
collectgarbage:
args:
- type:
Expand Down
Loading