We have:
#line <line> "<filename>"#push <line> "<filename>" (since PR 547)#pop (since PR 547)The #line directive sets the line number and the file name of the next line to parse. For example, with
def x = 10
#line 100 "foo"
def y = 20
the compiler assumes that x is defined in line 1 of the current file, and x is defined in line 100 of file foo. Note that #line must be aligned to the leftmost column of the source code.
Setting the file name is optional (and since PR 547, you can also set only the file name and keep the line number).
The #push directive works like #line but its effect can be undone with #pop. For example:
def x = 10
#push 100 "foo"
def y = 20
#pop
def z = 30
Now, y is assumed to be defined on line 100 of “foo”, and z is assumed to be defined on line 5 of the current file.
(Since PR 557.)
You can redirect amp so that it fetches the source code from a remote URL, e.g.
module m
_source_ { url:"<https://whereever>" }
This file should not contain any other directive or definition, and there must not be any module parameters. The remote resource must return the source code for an HTTP GET with code 200. The file must be publicly accessible.
Such redirects cannot be nested.
Notes about getting files from github.com: