Skip to main content

Flagging Symbols

Symbol flags are a powerful feature in Codegen that allow you to mark and track specific code elements during development, debugging, or code review processes. Flags can be used to visually highlight code in the editor and can also integrate with various messaging systems.

Basic Usage

The simplest way to flag a symbol is to call the flag() method on any symbol:
When you flag a symbol, two things happen:
  1. A visual flag emoji (🚩) is added as an inline comment
  2. A CodeFlag object is created to track the flag in the system

Language-Specific Behavior

The flag system adapts automatically to the programming language being used:

Example: Code Analysis

Here’s an example of using flags during code analysis:
This feature is particularly useful when building, and iterating on the symbols that you are trying to modify.