summaryrefslogtreecommitdiff
path: root/src/specialize.mli
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-09-27 12:01:40 +0100
committerAlasdair Armstrong2018-09-27 12:06:05 +0100
commit645a5d90df9fc8f89ab9d6868c1a51f7429a890d (patch)
tree7a779bf0a95e386df78c1d72482784b3bdb53ca5 /src/specialize.mli
parentdc9bbf26befc9e1ec0c8e4dd93a5041d71954ec6 (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/specialize.mli')
0 files changed, 0 insertions, 0 deletions