Skip to content

Conversation

@cerupcat
Copy link

@cerupcat cerupcat commented Oct 21, 2025

Mustache templating is very limiting in terms of logic and requires the data source to have a lot of granular information.

@inja is a modern c++ templating language that has a lot more control without requiring the data source to provide grandular details (eg. array size counts, whether a property exists, etc)

This adds an option to use Inja for code generation instead of Mustache to allow for more expressive templates that require complex logic for generating code.

@cerupcat cerupcat changed the title Wn/codegen Integrate Inja Code Generation Oct 23, 2025
@cerupcat cerupcat changed the base branch from add-data-binding to main October 30, 2025 21:05
…nV3.riv. The root cause was missing null pointer checks in three places:

1. Nested ViewModel Property Access (main.cpp:691-693)
Problem: Chained calls viewModel->createInstance()->propertyViewModel() without null checks
Fix: Added null checks for createInstance(), propertyViewModel(), instance(), and viewModel()
2. Enum Property Access (main.cpp:730-736)
Problem: Chained calls accessing enum properties without null checks
Fix: Added null checks for createViewModelInstance(), propertyValue(), and all subsequent property accesses
3. Default Value Property Access (main.cpp:786-818)
Problem: Accessing property values without null checks for boolean, number, string, and color types
Fix: Added null checks for each property value access
4. Nested Artboard Instance Access (main.cpp:525)
Problem: nested->artboardInstance() could return null causing crash during recursion
Fix: Added null check before recursively calling getNestedTextValueRunPathsFromArtboard()
5. Default Artboard Instance Access (main.cpp:882)
Problem: defaultArtboard->instance()->defaultStateMachine() without null check on instance()
Fix: Added null check for instance() before accessing defaultStateMachine()
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.

2 participants