This repository was archived by the owner on Aug 25, 2025. It is now read-only.
Major API update
This release contains many changes to increase consistency, flexibility, and usability:
addConstis nowaddConstant- if called on a class, it now takes a
CodegenClassConstantobject - if called on a file, it now takes a
CodegenConstantobject
- if called on a class, it now takes a
addTypeConstis nowaddTypeConstantand takes aCodegenTypeConstantobject- adds
CodegenShapeandCodegenShapeMemberobjects - adds
HackBuilderValues::codegen()to allow building aCodegen*as a value - renamed various
*Baseclasses to*ishfor consistency with other internal classes, HHAST, and the Hack parser - for example,CodegenClassish - adds support for adding constraints to generics
- uses HSL format strings throughout
- uses
\0instead of\tas the separator for functions that accept suggested whitespace, allowing use where tabs are desired instead of spaces - add
HackBuilderValues::regex()to support rendering re prefix strings CodegenEnumis no longer aCodegenClassish, as the majority of methods were not relevant- added
addVerbatimto HackBuilder. This does not auto-indent the results; one use is heredocs.