Whether it can be synthesized or not bases on the data volum of "a "and "b" ,the code style and your vendor lib. you can try to synthesize the code in a seperate module.
this is my opinion,hope it can help u a bit.
Ternary operators can be synthesized if they are used along with the assign statement. When used with the assign statement (conditional assignment), this code yields a MUX, for ex,