diff options
| author | Alasdair Armstrong | 2018-09-27 12:01:40 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-09-27 12:06:05 +0100 |
| commit | 645a5d90df9fc8f89ab9d6868c1a51f7429a890d (patch) | |
| tree | 7a779bf0a95e386df78c1d72482784b3bdb53ca5 /src/elf_loader.ml | |
| parent | dc9bbf26befc9e1ec0c8e4dd93a5041d71954ec6 (diff) | |
Add new functions in ast_util.ml for working with locations
When constructing expressions, we need to provide locations for the
generated expressions to give useful error messages. However adding
these at every mk_X function in ast_util would be very verbose,
especially for complex expressions.
Add new locate_X functions (with the one for expressions simply being
called locate), which take a location and recursively apply it to
every child node, e.g.
locate (gen_loc l) (mk_exp (... (mk_exp ..., mk_exp ...)))
would mark every part of the constructed expression as being generated
from code at location l.
Diffstat (limited to 'src/elf_loader.ml')
0 files changed, 0 insertions, 0 deletions
