This is not going to work. eval() does not just drop the text into the input buffer where it might be completed by later code after the eval. eval() runs a complete parsing session on code that must be complete in itself.
The effect is like running a script. If you run a script has several extra end statements, then those statements do not get buffered and act upon calling routine: you get a syntax error instead.
eval is built in. To see the source code you will need to get a job with Mathworks.
You cannot eval inside a parfor block. parfor needs to do static analysis to figure out what memory to transfer.
There are way way too many problems with the kind of semantics that you want. For example
if rand<. 5
How many iterations does this do? Is the code complete or not? The code might eval extra end statements so you cannot tell just by reading it where the blocks terminate under your proposal.
What is possible is to put sections of code into data files, and have other code that reads the data file, puts for or parfor as the first word and writes the results to a file. Then run the file as a script.
You will still run into some problems as there are differences in treatment of variables that also happen to be function names when you use scripts.
On the other hand, you can drop the entire function in as a data file and preprocess the entire function, at the point where you change bool_parfor