AST: Handle ternary operators