mirror of
https://github.com/SpaceManiac/SpacemanDMM.git
synced 2025-08-04 02:28:21 +00:00
![]() This adds a new arm to the parser for the `for (var/k, v in X)` dict-like syntax that was added in 516. I have hijacked the arm that checks for this type of expressions : `for (init, test, inc)` or `for (init; test; inc)` I have seperated it between `init; test; inc` (left untouched) and `init, test, inc`. If `inc` is not None, I then check if `test` in a `BinaryOp::In` (something like `for(init, [x in y])`. If not I just assume it's a `for (init, test)` which is valid DM syntax. I then check if `init` is a `var/k` type of statement, using copypaste. DM will not compile `for (k, v)` nor will it compile `for (var/k, var/v)`. I check if v is an ident. If we're all good, I create a new type of structure `ForKeyValueStatement` and the lib.rs / findreferences.rs knows what to do with it. Both `for (i = 0, i < 10, i++)`, `for (i = 0, i < 10)` still pass. |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml | ||
README.md | ||
wasm-imports.js |
DreamMaker Language Server
This package is a language server implementation for DreamMaker, the scripting language of the BYOND game engine. All features are dependent on client support.
- Visual Studio Code extension (code).
- Sublime Text 3 package (code).
- Other editors may have generic language client packages which will be compatible.
Code completion
- Completes names of typepaths, procs, type vars, local vars, and macros.
- Popup includes symbol type as well as the value of constants.
- Completes var and proc overrides in type definitions.
- Proc overrides include a stub which calls
..()
.
- Proc overrides include a stub which calls
Hover
- Shows inheritance information when hovering proc headers and type vars.
Go to definition
- Finds the definition of typepaths, procs, type vars, local vars, and macros.
- In some clients, integrates with DM Reference browser.
Workspace symbol search
- Searches macros, types, procs, and vars.
- Prefix query with
#
to search macros only,var/
to search vars only, orproc/
to search procs only. - Include
/
in query to search types only. - In some clients, integrates with DM Reference browser.
Find all references
- Finds all uses of:
- Typepaths as a literal.
- Procs, called and overridden.
- Type vars, read, written, and overridden.
Diagnostics
- All parsing suite diagnostics.
- Optional DreamChecker diagnostics.
Signature help
- Gives proc argument help, including for builtin procs, when a
(
is typed or on command.
Document symbols
- Provides an "outline" view of symbols in the current file.