✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// TEST: Pattern Branches Parser Support
// ============================================================================
// Verifies that the parser correctly handles [...] pattern branch syntax.
// Pattern branches allow opaque expressions as branch names for DSL transforms.
//
// The [...] content is passed through as the branch name - transforms interpret it.
// ============================================================================
// Simple event to test pattern branches
~tor test-patterns {}
~proc test-patterns|zig {
}
// Test that pattern branches parse correctly
// The branch names are [GET /users/:id] etc - opaque to the compiler
~test-patterns()
| [GET /users/:id] => ok
| [POST /users] => ok
| [nested [brackets] work] => ok
| [* -> stopped] => ok // State machine style
// Verify nested patterns work
~test-patterns()
| [/admin/*] |> test-patterns()
| [GET /dashboard] => ok
Must contain:
no branch 'GET /users/:id'Flows
flow ~test-patterns click a branch to expand · @labels scroll to their anchor
test-patterns
flow ~test-patterns click a branch to expand · @labels scroll to their anchor
test-patterns