I feel like I've seen source code that reads like this.
http://bfalo.com/ and github project https://github.com/bfalo/buffalo-lang
It was also a good excuse to learn about tokenization, compilers & interpreters.
I was thinking of something more general like:
foo = foo.foo("foo");
(And yes the reassignment is intentional as the returned object isn't necessarily the same as the caller.)