Skip to content

Commit

Permalink
Docs and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Kampfkarren committed Oct 9, 2024
1 parent e2fb919 commit a24f949
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [Unreleased](https://github.com/Kampfkarren/selene/compare/0.27.1...HEAD)
### Added
- Added `Path2DControlPoint.new` to the Roblox standard library
- [Adds `lua_versions` to standard library definitions](https://kampfkarren.github.io/selene/usage/std.html#lua_versions). Specifying this will only allow the syntax used by those languages. The default standard libraries now specify these, meaning that invalid syntax for that language will no longer be supported.

### Changed
- Upgrades to [full-moon 1.0.0](https://github.com/Kampfkarren/full-moon/blob/main/CHANGELOG.md#100---2024-10-08), which should provide faster parse speeds, support for multiple parsing errors at the same time, and support for some new Luau syntax.

## [0.27.1](https://github.com/Kampfkarren/selene/releases/tag/0.27.1) - 2024-04-28
### Fixed
Expand Down
23 changes: 22 additions & 1 deletion docs/src/usage/std.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,34 @@ For examples of the standard library format, see:

## base

Used for specifying what standard library to be based off of. This supports both builtin libraries (lua51, lua52, lua53, roblox), as well as any standard libraries that can be found in the current directory.
Used for specifying what standard library to be based off of. This supports both builtin libraries (lua51, lua52, lua53, lua54, roblox), as well as any standard libraries that can be found in the current directory.

```yaml
--- # This begins a YAML file
base: lua51 # We will be extending off of Lua 5.1.
```
## lua_versions
Used for specifying the versions of Lua you support for the purpose of supporting the syntax of those dialects. If empty, will default to 5.1.
Supports the following options:
- `lua51` - Lua 5.1
- `lua52` - Lua 5.2
- `lua53` - Lua 5.3
- `lua54` - Lua 5.4
- `luau` - [Luau](https://luau-lang.org)
- `luajit` - LuaJIT

Usually you only need to specify one--for example, `lua54` will give Lua 5.4 syntax and all versions prior. That means that if you specify it, it will look something like:

```yml
lua_versions:
- luajit
```

If you are extending off a library that specifies it (like `lua51`, etc) then you do not need this. If you specify it while overriding a library, it will override it.

## globals
This is where the magic happens. The `globals` field is a dictionary where the keys are the globals you want to define. The value you give tells selene what the value can be, do, and provide.

Expand Down

0 comments on commit a24f949

Please sign in to comment.