Merge pull request #233 from dra27/improve-include-error
Improve error handling for (:include )
This commit is contained in:
commit
a7406ab169
|
@ -82,9 +82,12 @@ module Unexpanded = struct
|
|||
let open Ast in
|
||||
match t with
|
||||
| Element s -> Element s
|
||||
| Special (l, s) -> Special (l, s)
|
||||
| Union [Special (_, "include"); Element fn] ->
|
||||
Include (Sexp.Of_sexp.string fn)
|
||||
| Union [Special (loc, "include"); _]
|
||||
| Special (loc, "include") ->
|
||||
Loc.fail loc "(:include expects a single element (do you need to quote the filename?)"
|
||||
| Special (l, s) -> Special (l, s)
|
||||
| Union l ->
|
||||
Union (List.map l ~f:map)
|
||||
| Diff (l, r) ->
|
||||
|
|
Loading…
Reference in New Issue