Many polyglots fill in the blanks between languages by either making code that is ignored in one language or loading code dynamically.
This time, let's write a polyglot that works without that. This polyglot will print the name of the language in each of the (at least 2) languages running it, for example "Python" or "JavaScript". The languages must be different rather than different versions of the same language.
Rules
- All code must be parsed at compile time (e.g. no comments, but dead code like unused string literals is allowed)
- No code must be parsed at runtime (no eval, exec etc.)
- No errors/exceptions, code must exit with status 0. Warnings are fine.
The hope here is to showcase some parser differences of the same code in two different languages: the cooler the parser differential, the better.