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
6bcc70e07eebac25cb28e3ff6fa8516d54d6b63f
hakorune/apps/tests/ternary_nested.hako

11 lines
179 B
Plaintext
Raw Normal View History

🔧 Fix peek expression terminator issues and add ternary operator support - Fix LLVM IR terminator missing in peek expression entry blocks - Add proper jump instructions between peek blocks - Implement ternary operator (? :) as syntactic sugar for peek - Update Python LLVM externcall handling for improved compatibility - Add comprehensive test cases for peek and ternary expressions - Update language guide with ternary operator documentation ChatGPTが頑張って修正してくれたにゃ!🐱 Co-Authored-By: ChatGPT <noreply@openai.com>
2025-09-14 20:30:38 +09:00
static box Main {
main(args) {
local a = 3
local b = 5
// Nested ternary: should evaluate to 50
local v = (a < b) ? ((b < 0) ? 40 : 50) : 60
return v
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 69ms 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