mirror of
https://github.com/franalgaba/grimoire.git
synced 2026-09-14 20:26:31 +08:00
001b16258c
* migrate .spell DSL from indentation to brace-delimited syntax (SPEC-001)
Replace Python-style 2-space indentation with Rust/Go curly-brace
blocks across the entire codebase. This is a breaking syntax change
that improves agent authorship — LLMs handle braces far better than
whitespace-significant formats.
Tokenizer: remove INDENT/DEDENT tokens, split bracketDepth into
parenDepth (suppresses newlines) and braceDepth (preserves newlines),
remove IndentationError.
Parser: replace all INDENT/DEDENT patterns with LBRACE/RBRACE across
~22 methods. New parseBraceBlock() helper replaces parseStatementBlock().
Two patterns: label blocks (label: { }) and keyword blocks (keyword { }).
AST, transformer, IR generator, and runtime are unchanged — indentation
was purely a lexical/parse concern.
Updated 86 .spell fixture files, 15 test files, 20 documentation files,
README, AGENTS.md, VM spec references, and compiler-pipeline docs.
620 tests pass, 0 fail.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add changeset
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
624 B
Plaintext
32 lines
624 B
Plaintext
# Test: Multi-step Aave V3 — deposit, borrow, repay
|
|
|
|
spell TestAaveBorrowRepay {
|
|
|
|
version: "1.0.0"
|
|
description: "Deposit USDC then borrow — tests multi-action Aave flow"
|
|
assets: [USDC]
|
|
|
|
params: {
|
|
deposit_amount: 1000000
|
|
borrow_amount: 500000
|
|
|
|
}
|
|
state: {
|
|
persistent: {
|
|
deposits: 0
|
|
|
|
}
|
|
}
|
|
venues: {
|
|
aave_v3: @aave_v3
|
|
|
|
}
|
|
on manual: {
|
|
aave_v3.deposit(USDC, params.deposit_amount)
|
|
deposits = deposits + 1
|
|
emit deposited(amount=params.deposit_amount, deposits=deposits)
|
|
aave_v3.borrow(USDC, params.borrow_amount)
|
|
emit borrowed(amount=params.borrow_amount)
|
|
|
|
}
|
|
} |