Commit graph

1624 commits

Author SHA1 Message Date
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
Tad Hardesty
093675cf28 Fix kirbyplant/random rendering 2020-10-08 18:25:22 -07:00
Tad Hardesty
3463cda922 Implement bitmask smoothing 2020-10-08 18:24:33 -07:00
Tad Hardesty
1d3f2a2a36 Rename constants according to bitmask smoothing refactor 2020-10-08 17:52:39 -07:00
Tad Hardesty
7973937362 Add another sleep-override unit test for parent_type situations 2020-10-08 17:15:07 -07:00
spookydonut
ed0b94d4a3
Fix sleep and purity lints not counting proc overrides (#214)
Fixes #203.
2020-10-08 17:14:38 -07:00
Leshana
21c4192395
Populate errortype on more errors (#201)
- Added unreachable_code, proc_has_no_parent, and 
  loop_condition_determinate error types.
- Added one use of control_condition_static where it was missing.
- Added unit tests covering some of the error conditions I looked at 
  while adding these.
2020-10-06 22:35:45 -07:00
Tad Hardesty
ff60f2cf1a Exit dmdoc --dry-run with an error count 2020-10-06 22:13:45 -07:00
Tad Hardesty
6a4d76600e Warn on .dm, .txt, .md crosslinks which do not exist or are undocumented 2020-10-06 22:08:01 -07:00
ZeWaka
c52536bbe1
Implement multiple suggested clippy lints (#213)
* match_like_matches_macro
* mem_replace_with_default
* match_ref_pats
* single_char_push_str
* len_zero
* should_implement_trait
* mem_discriminant_non_enum
* needless_return
2020-10-04 11:56:59 -07:00