Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce :compile-only flag to EVAL
Does all of the stuff it needs to do to run, but doesn't actually run it. Returns Nil if compilation was ok, throws otherwise (as usual). Inspired by: https://stackoverflow.com/questions/56190676/checking-syntax-of-a-string-or-file
- Loading branch information
Showing
1 changed file
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d41f162
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jnthn: hope this is ok, seemed like a nice feature to have. If not, please revert.
d41f162
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lizmat I guess as a feature it's OK, though I wonder if
:check
would not be a more succinct and appropriate name (meaning both of "run it up toCHECK
time" and "just check the syntax"). Also, what happens if we use this with, say,:lang<Perl5>
? (I'd not expect it to support the feature without work, but I would expect it to not silently just go ahead and run the code...)d41f162
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make more sense to make Perl6::Compiler available?
d41f162
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made as suggested in 5b3a8ce0ed .