Logo
Explore Help
Register Sign In
tomoaki/hakorune
1
0
Fork 0
You've already forked hakorune
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
d74f77d2ede91172f6b2f897f36e455a977f9aad
hakorune/apps/tests/loop_continue_pattern4.hako

18 lines
300 B
Plaintext
Raw Normal View History

feat(joinir): Structural pattern detection + Pattern 4 scaffold - Add LoopFeatures struct for structure-based detection (no name deps) - Add LoopPatternKind enum and classify() function - Pattern 3: has_if_else_phi && !has_break && !has_continue - Pattern 4: has_continue == true (detection only, lowering TODO) - Unify router to use extract_features()/classify() instead of legacy - Remove AST dependency, use LoopForm/LoopScope only - Add Pattern 4 test file (loop_continue_pattern4.hako) - Pattern 3 test passes (sum=9) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 00:10:27 +09:00
// Pattern 4: Loop with Continue
// Expected output: sum = 25 (1+3+5+7+9, skip even numbers)
static box Main {
main() {
local i = 0
local sum = 0
loop(i < 10) {
i = i + 1
if (i % 2 == 0) {
continue
}
sum = sum + i
}
print(sum)
return 0
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 43ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API