mys-lang / mys

The Mys programming language - an attempt to create a statically typed Python-like language that produces fast binaries. See https://mys-lang.org for more information.
Other
132 stars 5 forks source link

debugger entry points #41

Open pmp-p opened 3 years ago

pmp-p commented 3 years ago

all compiler or runtime errors that could happen at various stage of using "mys" command, if able to get a source filename, maybe a line number and optionnal colummns + an error message should adress a call to a function (eg builtins.mys_debug ) loaded from a module that could be overridden from command line eg :

--debug=mymodule

try:
    __import__(mymodule)
except:
    def mys_debug(*argv,**kw):
        pass # or the default fancy display with colors as an example.
    import builtins
    builtins.mys_debug

this is mainly for interacting with IDE and/or when compiling remotely to give a translated filename.