OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

Improves the grammar, functionality, and code quality of set declarations

Open Altoids1 opened this issue 3 years ago • 1 comments

image

Summary

Fixes #751 by doing a bunch of facelifting of how set statements are constructed.

In fixing this, I ended up shotgun-debugging a lot of things surrounding how set statements are constructed. This PR also include some additional documentation added to various things, as I looked at them or touched them during development of this.

Changelog

  • Fixes set declarations not respecting commas, indented blocks, nor bracing.
  • Blocks now very consistently evaluate their set statements first and foremost, before anything else, in a way that makes sense
  • Use of the in keyword is now properly prohibited for all set use cases except 'src'
  • set src now properly gives an unimplemented warning
  • Slightly optimizes DMASTProcBlockInner by reducing empty array allocations.
  • Removes DMASTProcStatementMultipleVarDeclarations, and replaces it with DMASTAggregate<>.
  • Makes Consume array overload return the TokenType if found

Altoids1 avatar Aug 22 '22 22:08 Altoids1

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Sep 27 '22 17:09 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Nov 02 '22 01:11 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Dec 04 '22 01:12 github-actions[bot]

This PR now correctly mimics the cursed behaviour BYOND has when a set statement's right-hand side is non-constant. This feature must be manually enabled through a #pragma directive.

Altoids1 avatar Dec 06 '22 18:12 Altoids1

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Jan 04 '23 02:01 github-actions[bot]

Fails CI, in case you didn't see the last run finish.

ike709 avatar Jan 13 '23 19:01 ike709

This appears to be on an older version of RobustToolbox.

wixoaGit avatar Jan 13 '23 19:01 wixoaGit

This appears to be on an older version of RobustToolbox.

Github Desktop is a useful tool for resolving merge conflicts

Altoids1 avatar Jan 13 '23 20:01 Altoids1