Skip to main content

Execution Lifecycle

How Kexra programs are parsed, compiled, and executed.

Why this exists

Understanding execution helps developers write efficient, correct code.

How it works

Programs go through lexing, parsing, and interpretation phases in sequence.

Examples

  1. Source code → Tokens (lexing)
  2. Tokens → AST (parsing)
  3. AST → Execution (interpretation)

Common mistakes

  • Assuming compilation happens
  • Not understanding interpretation overhead