Skip to content

Fix missing prettyPrint overloads in header and implementation#2209

Open
ActualMasterOogway wants to merge 1 commit intoluau-lang:masterfrom
ActualMasterOogway:master
Open

Fix missing prettyPrint overloads in header and implementation#2209
ActualMasterOogway wants to merge 1 commit intoluau-lang:masterfrom
ActualMasterOogway:master

Conversation

@ActualMasterOogway
Copy link

@ActualMasterOogway ActualMasterOogway commented Jan 23, 2026

This PR fixes a discrepancy between Ast/include/Luau/PrettyPrinter.h and Ast/src/PrettyPrinter.cpp.

The header declared std::string prettyPrint(AstStatBlock& ast); but the implementation was missing.
The implementation had std::string prettyPrint(AstStatBlock& block, const CstNodeMap& cstNodeMap) but it was not declared in the header.

Changes:

  • Added std::string prettyPrint(AstStatBlock& block, const CstNodeMap& cstNodeMap); to PrettyPrinter.h.
  • Implemented std::string prettyPrint(AstStatBlock& block) in PrettyPrinter.cpp (delegating to the 2-arg version).
  • Added a unit test to verify prettyPrint(AstStatBlock&) works correctly.

Fixes #2206

Exposed the prettyPrint overload that accepts CstNodeMap in the header and added a corresponding unit test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Luau.Ast] Signature mismatch for prettyPrint in PrettyPrinter.h vs PrettyPrinter.cpp

1 participant