Commit graph

1633 commits

Author SHA1 Message Date
Tad Hardesty
3e8021087a Run 'cargo update' 2021-02-08 12:50:35 -08:00
ZeWaka
6729f4e9d5
Fix flag names for 'layer' and 'rays' filters (#243) 2021-02-05 18:15:05 -08:00
Tad Hardesty
75eb2df5f9 Order operators properly, add test to enforce this 2021-02-02 17:00:10 -08:00
ZeWaka
244509ce85
Add most 514 builtins support (#240)
Don't know if you want to put this based on a 514 branch or something, 
for full support. Here's the bulk of the work done for the builtins 
though.

- gradient()
- animate(space) // weird form
- rgb(space) // weird form
- rgb2num()
- filter(type="bloom")
- load_resource()
- splicetext()
- list.Splice()
- time2text()
- world.timezone
- client.timezone
- ||=
- &&=
- world.movement_mode + enums
- := walrus/assign-into/expression assign
- world.map_cpu
- particles/
- generator/
- embedded winget syntax // don't think we need to add anything
- mouse actions // don't think we need to add anything

note: uncovered http://www.byond.com/forum/post/2652280

Tested the produced executable:
![image](https://user-images.githubusercontent.com/4741640/106538107-8d2
58480-64b0-11eb-9d65-0020229647d7.png)
2021-02-02 16:59:11 -08:00
Tad Hardesty
591b404075 Show stdout/stderr of launched process in Debug Console 2021-01-21 20:42:36 -08:00
Tad Hardesty
8a07b193ae Set LD_LIBRARY_PATH in case of launching DreamDaemon 2021-01-21 20:09:22 -08:00
William Wallace
4ea806047c
Offload eval (disassemble/help commands) processing to auxtools (#238)
This requires an update to 
https://github.com/willox/auxtools/releases/tag/debug-v1.0.0. 

Basically, this'll let me add new debug console commands without having 
to touch SpacemanDMM. I'm gonna be adding some as I push my way through 
some DM bytecode related stuff so this'll save me a bunch of effort.

There's no new functionality here, it's still only `#help` and `#dis`.

The DLL is starting to get a bit big (it's still much smaller than a 
tiny example implementing maptick which for some reason comes out at 
2.5MB) so I'll try to get them smaller before making any new releases.
2021-01-21 20:09:15 -08:00
Tad Hardesty
809bdceb5f Add FALSE and TRUE as macros
Many other builtin global consts should also double as macros, but
documentation attributes will need to be supported for them.
2021-01-13 20:35:14 -08:00
Tad Hardesty
299f142b05 Add variable name to const-evaluation error 2021-01-13 20:33:36 -08:00
Tad Hardesty
a01f4116d6 Add first version of ref linking to dmdoc 2020-12-14 21:58:07 -08:00
Tad Hardesty
23270e6aeb Use manually specified hash in langserver go-to-def 2020-12-13 16:24:18 -08:00
Tad Hardesty
1dd4c21c4e Add dm_ref attributes to some builtins 2020-12-13 15:47:16 -08:00
Tad Hardesty
e35c23eefa Allow brace nesting in builtins table 2020-12-13 15:33:13 -08:00
Tad Hardesty
9f45b40eb1 Convert builtin attributes to .docs method calls 2020-12-13 14:19:54 -08:00
Tad Hardesty
a121ad1599 Change add_builtin_entry to add_builtin_type 2020-12-12 21:30:25 -08:00
Tad Hardesty
0ef0188cc5 Remove use of '?' from register_builtins
Reduces this function's code size from ~110KiB to ~30KiB.
2020-12-12 21:19:10 -08:00
Tad Hardesty
8501c960e6 Directly pass 'None' to add_builtin_var 2020-12-12 21:14:27 -08:00
Tad Hardesty
9221beb291 Add missing #[allow(unused_mut)] 2020-12-12 21:11:49 -08:00
Tad Hardesty
2614c453f0 Expand parsing capabilities of entries! proc macro 2020-12-12 20:28:16 -08:00
Tad Hardesty
d60e2161e5 Skip default-open 'code' node when calculating Toggle All 2020-12-12 14:42:14 -08:00
Tad Hardesty
bce6937a0d Fix warning when building in release mode 2020-12-10 20:19:02 -08:00
Tad Hardesty
395e1efe93 Fix auxtools bundle code 2020-12-10 20:18:52 -08:00
Tad Hardesty
b6cf638086 Stop giving fix hints which point to builtins 2020-12-10 20:03:30 -08:00
Tad Hardesty
a5857a9cd8 Allow configuring dmdoc module directories 2020-12-09 20:32:46 -08:00
Tad Hardesty
18c02d980e Add configuration option for dmdoc index file 2020-12-08 23:14:45 -08:00
William Wallace
00edac18cb
Add #dis, wait-for-configure, other tweaks to Auxtools (#233)
This fulfils some auxtool debugger requests you had.

1) All connection modes except for `BACKGROUND` wait for the DAP client 
   to be configured before continuing.
2) stddef.dm contents are sent to the debug client
3) disassemble eval command works (with the added benefit of being able 
   to disassemble procs that aren't currently running)

The updated auxtools also does some other stuff you wanted:

1) src/usr moved to arguments
2) your PR https://github.com/willox/auxtools/pull/11
3) arguments with no formal parameter in a proc that is being debugged 
   should show up
2020-12-08 22:34:18 -08:00
Tad Hardesty
86899bfd54 Add ref location notes to some builtins 2020-12-06 16:10:26 -08:00
Tad Hardesty
730ce571fd Use object instead of array in dmdoc tree view 2020-12-01 18:15:40 -08:00
Tad Hardesty
4a177c0919 Expand the first level of the Modules tree by default 2020-11-30 20:54:26 -08:00
Tad Hardesty
ab9c425569 Add a hanging indent and bottom padding to summary table headers 2020-11-30 20:47:53 -08:00
Tad Hardesty
1dc27b789a Add global vars to the module tree 2020-11-30 20:39:05 -08:00
Tad Hardesty
7c37211691 Add global procs to the modules tree 2020-11-30 20:34:53 -08:00
Tad Hardesty
ef78e8b8e3 Always add documented types to the modules tree 2020-11-30 20:19:20 -08:00
Tad Hardesty
ba5dde55df Handle duplicate variable names (Auxtools) 2020-11-27 17:44:13 -08:00
Tad Hardesty
c93661f3d1 Move Locals before Arguments in the scopes list (Auxtools) 2020-11-27 17:44:05 -08:00
William Wallace
2737e5d352
Add Auxtools debugging support (#230)
This adds support for a debug server written in auxtools (currently 
located at https://github.com/willox/auxtools).

The dependency is similar to extools, where SpacemanDMM's 
`auxtools_types.rs` has to be up-to-date with the `server_types.rs` 
file located in whichever version of debug server is used. In the 
future this could change to be some shared dependency, or maybe the 
debug server could just be moved into SpacemanDMM.

There's a bunch of repeated code in `mod.rs` where there's match 
statements where one branch is for the extools client and one branch is 
for auxtools client. It's a bit iffy, but they all have minor 
differences and wouldn't be super easy to merge.

I accidentally ran a `cargo fmt` on the files I was working with at 
some point, so there's a few formatting changes about. I don't think 
it's too much to read over.

I haven't edited any documentation yet, so here's how it works:
In your DM project:
```dm
// Currently needed for auxtools' error reporting. TG code already has this defined.
/proc/stack_trace(msg)
	CRASH(msg)

/proc/enable_debugging(mode, port)
	CRASH("auxtools not loaded")

/world/New()
	var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
	if (debug_server)
		call(debug_server, "auxtools_init")()
		enable_debugging()
	. = ..()

/world/Del()
	var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
	if (debug_server)
		call(debug_server, "auxtools_shutdown")()
	. = ..()
```

In your project's SpacemanDMM.toml
```toml
[debugger]
engine = "auxtools"
```

The extension doesn't have a way to override the DLL being used (and I 
don't think it should), so if you're testing stuff I suggest you set 
the env vars to something like below and use the attach mode:
```
AUXTOOLS_DEBUG_DLL=path_to_your_build
AUXTOOLS_DEBUG_MODE=BLOCK
```
2020-11-27 17:34:52 -08:00
pali
650daa0eb0
added warning for return x in spawn context (#228) 2020-11-24 23:08:38 +08:00
Tad Hardesty
13fd304f04 Box parts of Statement::Switch and ForLoop
Statement: 112 to 104
2020-11-23 20:11:47 -08:00
Tad Hardesty
2dcd579fa8 Change ast::Block from Vec to boxed slice
Statement: 120 to 112
2020-11-23 19:54:50 -08:00
Tad Hardesty
767f944c4a Box VarStatement in Statement::Var
Statement: 128 to 120
2020-11-23 19:54:56 -08:00
Tad Hardesty
e1ff16ef78 Box Term in Expression to save memory
Expression: 152 to 64
Statement: 216 to 128
2020-11-23 19:54:50 -08:00
Tad Hardesty
a28255e972 Box Prefab in Term to save memory
Term: 128 to 88
Expression: 192 to 152
Statement: 256 to 216
2020-11-23 19:54:50 -08:00
Tad Hardesty
e33ebabd3f Box the largest Statement variants to save memory
Statement: 664 to 256
2020-11-23 19:54:50 -08:00
Tad Hardesty
c939a1f65f Replace String with Ident in some data definitions 2020-11-22 16:51:41 -08:00
Tad Hardesty
0eecb87f54 Reduce code size of builtins::default_defines 2020-11-22 16:34:26 -08:00
Tad Hardesty
66d4b82972 Add 'repeat' from ripple filter to animate() parameter list 2020-11-22 13:02:50 -08:00
spookydonut
0af799c76e Add /sound/var/offset 2020-10-30 11:31:12 +08:00
spookydonut
66c3c90384
Fix "should not sleep" to catch world.Export and world.Import (#216)
Fixes #208.
2020-10-10 14:28:00 -07:00
Tad Hardesty
f2dc9a4567 Bump versions for suite 1.6 2020-10-08 19:03:17 -07:00
Tad Hardesty
4fa0aa1c99 Run cargo update 2020-10-08 18:45:46 -07:00