Is there any internal (as in memory-only) equivalent to running perl6 -c on a file to check the syntax? So far, there are two methods
I am looking for a safe (as in perl6 -c) and fast (as in EVAL) alternative. Any idea?
How to check the syntax of your Python code: First, Drag and drop your Python file or copy / paste your Python text directly into the editor above. Finally, you must click on "Check Python syntax" button to start code checking.
As noted in the comments above, Raku now supports this by letting you pass the :check
named parameter to EVALFILE (to check the syntax of a file) or to EVAL (to check the syntax of a string). In either case, the function will return Nil
if the syntax is valid and will throw the relevant exception if it is not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With