STEllAR-GROUP / phylanx

An Asynchronous Distributed C++ Array Processing Toolkit
Boost Software License 1.0
75 stars 76 forks source link

Give the option to physl to start a phylanx function at line one. #1190

Closed stevenrbrandt closed 4 years ago

stevenrbrandt commented 4 years ago

When running a Phylanx function, it's sometimes beneficial to start the line numbers for the function at line 1 rather than whatever the line is in the source file in which it is embedded. This PR provides an option to make that possible.

hkaiser commented 4 years ago

Wouldn't this be achieved with a lot less effort by making this conditional: https://github.com/STEllAR-GROUP/phylanx/blob/master/python/phylanx/ast/transducer.py#L93

By default, the source tree associated with an annotated block of Python code is numbered starting line one. We currently increment that to adjust for the position of the annotated code in the original source file.