Codegen uses a set of core behaviors that can be inherited by code elements. These behaviors provide consistent APIs across different types of symbols.Documentation Index
Fetch the complete documentation index at: https://codegeninc-fix-system-prompt-typo.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Core Behaviors
- HasName: For elements with Names (Functions, Classes, Assignments, etc.)
- HasValue: For elements with Values (Arguments, Assignments, etc.)
- HasBlock: For elements containing CodeBlocks (Files, Functions, Classes)
- Editable: For elements that can be safely modified (learn more)
These “behaviors” are implemented as inherited classes.
Working with Names
The HasName behavior provides APIs for working with named elements:Working with Values
The HasValue behavior provides APIs for elements that have values:Working with Code Blocks
The HasBlock behavior provides APIs for elements containing code:Learn more about CodeBlocks and Statements
here
Working with Attributes
The get_attribute method provides APIs for attribute access:Learn more about working with Attributes
here.