Commit bf1a0dac authored by Bruno Guillaume's avatar Bruno Guillaume

Fix localisation of lexical rules

parent b4bfa32c
......@@ -80,7 +80,11 @@ module Loader = struct
let rec flatten_modules current_file = function
| [] -> []
| Ast.Modul m :: tail ->
{m with Ast.mod_dir = Filename.dirname current_file}
let real_dir = Filename.dirname current_file in
{m with
Ast.mod_dir = real_dir;
rules = List.map (fun r -> {r with Ast.rule_dir = Some real_dir}) m.Ast.rules
}
:: (flatten_modules current_file tail)
| Ast.Includ (inc_file,loc) :: tail ->
let sub_file =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment