#!/usr/bin/env python3
import sys
sys.path.insert(0, 'src')

from alloy import parser

# Test cases that were failing
test_cases = [
    ('result = claude "Analyze this data"', "single assignment with string"),
    ('analysis = claude Analyze data', "single assignment with identifier"),
    ('summary = researcher Summarize', "single assignment without data"),
    ('result, error = parse_data(input)', "tuple assignment with tool call"),
    ('review = alloy Review code', "alloy command assignment"),
    ('result, error = claude Research "AI trends" then process_analysis', "then chaining"),
]

for test_code, description in test_cases:
    print(f"\nTesting: {description}")
    print(f"Code: {test_code}")
    try:
        ast = parser.parse(test_code)
        print(f"✓ SUCCESS: {ast}")
    except Exception as e:
        print(f"✗ FAILED: {e}")
        import traceback
        traceback.print_exc()