Add AstStatDeclareFunction to the Transpiler and fix AstStatDeclareFunction location issue with attributes #1934
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.
How do you even properly commit a pull request, I am copy pasting manually, I am not even using
git diff
and I don't want to make a separate branch and swap to it to do a pull request, because it breaks my CMake, someone please tell me! 🙏Like, I literally copy pasted the code manually from Visual Studio into this PR. Because I cloned master, and made this changes on a modified branch of mine that has debug logging, but I don't want to PR the debug logging as well, only specific commits, so... yeah... 🤷
Do I have to make another clone of luau and put it in another folder and name it like luau2 and keep both in-sync or something?
And then use
git diff
and send the changes to luau2 and use that to make PRs?Hence why, someone please tell me 🙏
Anyways, I commited, and I succeeded. That's because I was told what
writer.advance
does.At the beginning I actually took this route: https://paste.ivr.fi/olulyniwah.cpp
Except there's one thing it doesn't do, it doesn't know about
(
positions and it doesn't make a space àfter a->
if there's no CstNode present.This could be fixed in this pull request, simply by adding
else
like so, and have the Unit Test adjusted manually, but I don't know if I should, plus edit access is enabled.Then I fixed this issue https://discord.com/channels/385151591524597761/906369439262461992/1399132629592309800
If there are Attributes present for
AstStatDeclareFunction
. The AST node would not update the location to the beginning of the attribute's start location. This is fixed now.Not fixing this would break the other spaces for
writer.advance
and it took me a bit to figure this all out in the first place. :/