Why do you think that?
This is how most compilers used to work.
And languages like Pascal were specifically designed to be able to be compiled in a mostly single pass.
Look up ‘syntax directed translation’ in an old compiler textbook.
[0] https://eli.thegreenplace.net/2019/go-compiler-internals-add...