Repository navigation
Conversation
The editor's record forms and Scene view change records in the source as they are edited, so the source keeps its comments and layout instead of being written again from the mission. Each node of the syntax tree now has where it ends, from Luau's parser, and dte.source.edit makes the edits: set an argument, set or remove a field of a declaration's table, and add a declaration. language.fieldsOf gives the table of fields each declaration takes, for a form, and ShipReached's reach is public for the map to draw. Closes #1210
Collaborator
Author
|
Closing. The editor makes its own edits to the source, so OpenReliant's library stays as it is, and the link stays the original's protocol plus the messages that docs/engine/editor-link.md and #1126 document. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The editor's record forms and Scene view (OpenReliant/openreliant-editor#8, OpenReliant/openreliant-editor#2) change records in the source as they're edited. This adds what they need from the library:
dte.source.edit): set an argument, set or remove a field of a declaration's table, and add a declaration. Each edit replaces one span, so comments and layout stay. A new field goes on a new line with the same indent in a table over several lines, and on the same line otherwise; a trigger without fields gets a table before its function. Values are written as the decompiler writes them.language.fieldsOf: the table of fields each declaration takes and which argument it is, for the editor's forms. A test ties it to the declarations' signatures.events.reached_reachis public, for the map'sship_reachedrange.Checks:
zig build test(2665/2666, 1 skipped),zig fmt --check,make check-files,make check-missions(75 missions, 0 failing; the guide's change builds).Closes #1210