1. Which LLM are you using that is “not capable of getting syntax right”?
2. Are you referring to without having a compiler or LSP check it? Although even then, the recent LLMs I've used still frequently get syntax right, whereas I'd expect juniors are often relying on a LSP or compiler to catch mistakes when they first write a code block?