Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Major API update

Choose a tag to compare

@fredemmott fredemmott released this 08 Nov 16:55

This release contains many changes to increase consistency, flexibility, and usability:

  • addConst is now addConstant
    • if called on a class, it now takes a CodegenClassConstant object
    • if called on a file, it now takes a CodegenConstant object
  • addTypeConst is now addTypeConstant and takes a CodegenTypeConstant object
  • adds CodegenShape and CodegenShapeMember objects
  • adds HackBuilderValues::codegen() to allow building a Codegen* as a value
  • renamed various *Base classes to *ish for 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 \0 instead of \t as 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
  • CodegenEnum is no longer a CodegenClassish, as the majority of methods were not relevant
  • added addVerbatim to HackBuilder. This does not auto-indent the results; one use is heredocs.