🔧 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>
This commit is contained in:
10
apps/tests/ternary_nested.nyash
Normal file
10
apps/tests/ternary_nested.nyash
Normal file
@ -0,0 +1,10 @@
|
||||
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
Block a user