Commit graph

1816 commits

Author SHA1 Message Date
Tad Hardesty
1f331f5db1 Improve update-auxtools in case of staged changes 2024-03-19 13:13:27 -07:00
Tad Hardesty
2dac6eba15 Update copyright years 2024-03-14 13:03:22 -07:00
Tad Hardesty
4883ef0e15 Enable secret debugServerDll setting in release builds too 2024-03-13 00:02:51 -07:00
Tad Hardesty
707c7b4fb8 Update git2 dependency 2024-03-09 22:03:54 -08:00
Tad Hardesty
671f484b40 Run cargo update 2024-03-09 21:12:43 -08:00
Tad Hardesty
e5fa81d78e Properly swallow input types on bare variables
ex: var/foo as text|null
2024-03-04 14:32:45 -08:00
Tad Hardesty
59cfdbf826 Revert "Update to auxtools debug server v2.3.1"
This reverts commit 74cc3b870b.
2024-01-01 11:49:52 -08:00
Tad Hardesty
74cc3b870b Update to auxtools debug server v2.3.1 2023-12-30 15:42:48 -08:00
dependabot[bot]
02b7d9c10d
Bump zerocopy from 0.7.19 to 0.7.31 (#380)
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.19 to 0.7.31.
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/compare/v0.7.19...v0.7.31)

---
updated-dependencies:
- dependency-name: zerocopy
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-14 22:10:53 -08:00
Tad Hardesty
219269b9c4 Update to auxtools debug server v2.3.0 2023-12-14 17:35:31 -08:00
DreamySkrell
af80187a7f
Fix Map::adjust_key_length() (#379)
Currently, there is `Map::adjust_key_length()`, but it sets key length 
based on the amount of items in the dictionary. Which is fine if keys 
in order like 1-2-3-4-...-N, but it falls apart if the keys are not in 
order - which is valid for a dmm map.

If a map has keys like [1, 2, 3000], then, currently, 
`Map::adjust_key_length()` will set key length to 1, but the map will 
panic on save cause the 3000 key is bigger than max key for this key 
length (52).

This PR fixes `adjust_key_length` to work properly in that case, where 
it sets key length based on the biggest key in the map dictionary.
2023-11-18 17:41:40 -08:00
DreamySkrell
5311ff5f02
Let TGM writer take &mut impl Write (#378)
Also `dmm_tools::dmm::Map::to_writer()`, so it can be used to save to a 
string and not just a file, for use in external tooling that depends on 
this, and may want to, for example, pass the string back to byond from 
rust-g.

`dmm_tools::dmm::Map::to_file()` is kept for convenience (and 
backwards compatibility I guess to not break code), but it just uses 
the `::to_writer()` function.
2023-11-16 20:38:22 -08:00
DreamySkrell
356eeacab0
Derive Ord/PartialOrd for Coord2/Coord3 (#377)
So they can be used as keys in maps or the like, in external tooling 
that depends on this.
2023-11-16 20:33:11 -08:00
Tad Hardesty
cef9528642 Implement /proc/operator:=()
Fixes #376.
2023-11-07 19:16:15 -08:00
Tad Hardesty
5b4ba580ab Remove Tera template files
See 53f9447fa0
2023-11-05 23:02:06 -08:00
Tad Hardesty
6d0e149cc3 Include /final in var documentation
This was excluded back when it was a SpacemanDMM-specific feature, but
with BYOND 515 adding a real /final, it should be represented here.
2023-11-05 22:54:48 -08:00
Tad Hardesty
53f9447fa0 Speed up dmdoc massively by replacing Tera with Maud
A ton of time was spent constructing/destructing the Tera contexts, so
skipping that step by using a compile-time templater helps a lot. Takes
dmdoc time on /tg/station13 down from 10+ minutes to <5 seconds.
2023-11-05 22:54:12 -08:00
Tad Hardesty
0213b66f10 Fix Markdown headings rendering as <hh2> instead of <h2> 2023-11-05 21:57:57 -08:00
Tad Hardesty
f6b4c8f6fe Bump versions for suite 1.8 2023-10-29 12:56:45 -07:00
Tad Hardesty
ec65eb1cf9 Run cargo update 2023-10-29 12:56:22 -07:00
Tad Hardesty
7dc22d522b Bump declared BYOND version to 515.1619 2023-10-19 23:26:09 -07:00
Tad Hardesty
587361db60 Handle type::foo in dreamchecker 2023-10-19 23:25:20 -07:00
Tad Hardesty
311e43472a Fix additional clippy lints 2023-10-19 19:12:35 -07:00
Tad Hardesty
6207188963 Run cargo clippy --fix
Plus undo a formatting botch near `for candidate in` in preprocessor.rs.
2023-10-19 18:53:49 -07:00
Tad Hardesty
e5291ce927 Add consteval for nameof() 2023-10-19 18:44:44 -07:00
LemonInTheDark
2b3d30b9ac
Implement the scope operator (#367)
Adds support for :: to the parser, in all its forms (global proc/var, 
off type). Also implements behavior for it. We'll properly read the 
type of what  we attach to, and double check that everything matches. 
Works for the proc refs too.

I've added unit tests for all this to double check my work. I DIDN'T 
mirror the static var detection byond does. problem for another day.
2023-10-19 18:27:48 -07:00
LemonInTheDark
cdbb02897c
Parse 'as' return type syntax, but don't check it (#370)
I'm not hooking it into the existing return type system because I'm
pretty sure it doesn't already support primitives, and I am not prepared
to deal with that bullshit.

It will parse without erroring tho, so that's based.
2023-10-19 17:55:12 -07:00
Tad Hardesty
970e9d0cfd Fix operator/ and operator/=
Neither was handled in try_read_operator_name, and `operator/` needed
special handling in tree_path so that the `/` isn't taken as a tree path
separator and the method is ultimately named just `operator`.

Fixes #362.
2023-10-17 17:58:25 -07:00
LemonInTheDark
61165ec220
Implement /proc/final, piped into should not override (#369)
As a part of this we need to make a struct when building proc defs, to 
keep track of their flags AND their kind at the same time.

We then pass that down into a new flags var on the proc decl struct, 
and we're golden.

Only thing of note is I removed the is_private and is_protected vars 
from proc declarations because they were totally unused. Spooky added 
em a long time ago and I think it was for not much reason.
2023-10-17 17:26:38 -07:00
LemonInTheDark
e5dbc57757
Implement __IMPLIED_TYPE__ (#368)
It turns out this kinda sucks. it doesn't work with ::, so we don't even
really need to care about its value. I threw in support for constant
eval but that's inconsistent on our end cause type_hint doesn't always
play. I figure it's good to at least have something, and issues can get
sorted out as we go.

It is also seemingly massively annoying to eval in like, an istype(), 
since it has special case behavior there. I just kinda left it sit 
since I'm pretty sure it'd be a massive change to support and it like 
does not matter.
2023-10-16 23:54:22 -07:00
LemonInTheDark
a50249e6f8
Handle #pragma multiple, ignore other pragmas (#372)
I'm using a second hashmap to track multiple'd files. Not sure that 
this is the best way of going about it, but it's a living.
2023-10-16 22:32:57 -07:00
Tad Hardesty
39ef2d9aac Run cargo update 2023-10-14 23:07:07 -07:00
LemonInTheDark
d3dbed0fb2
Implements base functionality for __TYPE__ and __PROC__ (#366)
We basically just capture them early, and then treat them as unique
symbols. We don't replace inline or anything because the required
context isn't quite there.
2023-10-14 23:05:18 -07:00
LemonInTheDark
47ef0c58ab
Implement %%, %%=, and operator"" (#371)
The float stuff was easy. Operator was too, just took a bit to realize 
how it worked

Nothin much else to say, outside that I needed to roll my own operation 
for this one, since float remainder is kinda hard to find (and I 
couldn't after cursory reading)
2023-10-08 14:22:36 -07:00
Jordan Dominion
90992c7e6e
Allow measuring the memory footprint of the Objtree with GetSize trait (#359)
Useful for diagnostics.

Co-authored-by: Tad Hardesty <tad@platymuus.com>
2023-10-07 17:36:12 -07:00
Tad Hardesty
6df1be0be8 Add :: stubs to find_references 2023-09-03 22:06:49 -07:00
Tad Hardesty
6fc78ac43b Add AST variants for :: operator 2023-09-03 21:53:27 -07:00
Tad Hardesty
9467bd3ab3 Clean up after clippy --fix, including one real error 2023-07-20 21:57:25 -07:00
Tad Hardesty
fb57ec3c25 Replace unmaintained structopt with newer clap version 2023-07-20 20:11:36 -07:00
Tad Hardesty
269ae0ebb2 Run cargo update
Also explicitly declare our dependency on syn 1's "full" feature, as
otherwise the phf_macros upgrade means the feature will go missing and
cause failures in some situations.
2023-07-20 18:42:22 -07:00
Tad Hardesty
5eb5358fd9 Fix or quiet remaining clippy warnings 2023-07-20 17:47:51 -07:00
Tad Hardesty
3797c66c2f Run cargo clippy --fix 2023-07-20 17:30:38 -07:00
Tad Hardesty
1f9b4416b3 Remove dependency on guard crate
- `guard` 0.5.1 was released on 2021-04-11
- `let else` was stabilized in Rust 1.65.0 on 2022-11-03
- `box_syntax` became a hard error in Rust 1.70.0 on 2023-06-01
- `guard` has tests that use box_syntax so it no longer compiles
2023-06-01 19:33:19 -07:00
Tad Hardesty
fa608c5c9f Loosely parse proc return types
This is enough to get the parser past them but not enough to make them
useful.
2023-06-01 19:33:19 -07:00
Tad Hardesty
44a9a2ab3b Update to auxtools debug server v2.2.4 2023-06-01 19:33:19 -07:00
Jordan Dominion
34a656baf6
Optimize as much as possible in the release build (#357) 2023-05-08 20:27:46 -07:00
Spookerton
3eddd3204b
Add proc and constant builtins as of 515.1606 (#354)
Does not cover:

__PROC__
__TYPE__
proc/foo() as hint
#pragma
%%
%%=
A.operator%%(B)
A.operator%%=(B)
A.operator""()
2023-05-02 20:15:24 -07:00
Tad Hardesty
32bf1b3b98 Parse unary reference and dereference operators 2023-04-21 22:20:33 -07:00
Tad Hardesty
41297597fb Add final keyword as alias for SpacemanDMM_final 2023-04-21 19:19:04 -07:00
Tad Hardesty
240d8e02c4 Add Scope token '::' to lexer 2023-04-20 22:44:29 -07:00