Commit graph

1839 commits

Author SHA1 Message Date
jimmyl
c2ed4ed6e1
Change the typepath in the gravitygenerator render pass (#393)
/tg/ gravity generators no longer have a /station subtype so the gravity
generator pass doesn't do anything.
2024-06-23 14:35:32 -07:00
Tad Hardesty
2d00d0e2d7 Allow setting environment variables on DS/DD launch 2024-06-23 12:30:06 -07:00
Tad Hardesty
3206ddb261 Fix proc return type tests 2024-06-22 12:59:23 -07:00
Tad Hardesty
d75085266b Fix parsing of union proc return types
Fixes #385.
2024-06-20 21:16:10 -07:00
Tad Hardesty
17373dc1d9 Add sizeof guards for main AST nodes 2024-06-20 21:13:12 -07:00
LemonInTheDark
aec2fc9173
Const-evaluate filter() properly (#390)
We have a constant for it but nothing actually generates that constant. 
Should fix that.
2024-06-16 20:29:05 -07:00
LemonInTheDark
ca9e5a2c8c
Add colorspace as an arg to the gradient proc (#391)
We need to allow colorspace setting to make HSV gradients possible,
which is real powerful. It is technically a bit fucked because byond is 
ok with passing a value for index after the assoc space value, but we 
can just pretend that isn't a problem.
2024-06-16 18:29:17 -07:00
Tad Hardesty
ef9485246d Improve unexpected-EOF error message 2024-06-01 14:56:01 -07:00
Tad Hardesty
d704d63485 Fix clippy lints 2024-06-01 14:40:24 -07:00
Tad Hardesty
fbf6838291 Expand 'term' in errors to 'literal, variable, proc call' 2024-06-01 14:10:14 -07:00
Tad Hardesty
e47fb7c91c Rewrite parser from next/put_back to peek/take
Fixes recent bugs in error message generation.

Removes the need to track whether next() has been called multiple times
in a row for the purpose of ignoring out-of-place doc comments.
2024-06-01 13:49:26 -07:00
Tad Hardesty
5f5236f379 Improve formatting of dreamchecker error tests 2024-06-01 11:52:43 -07:00
Tad Hardesty
a97f9b47bb rustfmt: Add some #[rustfmt::skip]s for later 2024-05-28 23:50:12 -07:00
Tad Hardesty
f030e316b9 rustfmt: Blind-format crates/interval-tree 2024-05-28 23:26:07 -07:00
Tad Hardesty
e1b51dfee9 rustfmt: Add spaces around = in attributes 2024-05-28 23:09:39 -07:00
Tad Hardesty
b4a6857928 rustfmt: Sort imports 2024-05-28 23:09:35 -07:00
Tad Hardesty
8bbd2e1b19 Overhaul doc comment parsing
Fixes #332.
2024-05-28 22:45:16 -07:00
Tad Hardesty
a4afc52612 Allow extending DocCollection from Vec<DocComment> 2024-05-28 00:39:04 -07:00
Tad Hardesty
1a03fe0d27 Fix Unicode being mangled in doc comments 2024-05-27 23:55:26 -07:00
Tad Hardesty
551c3c921f Fix unused field warning in constant folder 2024-05-27 23:43:07 -07:00
Waterpig
30055a5b9f
Add delay argument to animate (#387)
515.1590 added the delay argument to animate() and I happen to be using it
2024-05-24 00:16:33 -07:00
ZeWaka
c6d85c798f
fexists can be called in the preprocessor (#388)
515 feature https://www.byond.com/forum/post/2857912

currently, 
```dm
#if fexists("secret/secret.dme")   // non-constant function call: fexists
#warn wow you have a secret.dme file
#endif
```

can't actually const eval since it can have diff. behavior at runtime obv

---------

Co-authored-by: Tad Hardesty <tad@platymuus.com>
2024-05-23 22:30:58 -07:00
Tad Hardesty
6c5a751516 Update to auxtools debug server v2.3.3 2024-03-19 13:13:31 -07:00
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