mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
feat(cpp): better locations after blocks end
This commit is contained in:
parent
10286098c4
commit
4934b302c6
1 changed files with 2 additions and 2 deletions
|
|
@ -74,7 +74,7 @@ let preproc_lines ~file ~major ~minor (ic:in_channel) : unit =
|
|||
| Eof -> fail "unexpected EOF"
|
||||
| If _ -> fail "nested if not supported"
|
||||
| Raw s -> print_endline s; cat_block()
|
||||
| Endif -> top()
|
||||
| Endif -> pp_pos(); top()
|
||||
| Elseif _ | Else -> skip_block ~elseok:false ()
|
||||
|
||||
(* skip current block.
|
||||
|
|
@ -84,7 +84,7 @@ let preproc_lines ~file ~major ~minor (ic:in_channel) : unit =
|
|||
| Eof -> fail "unexpected EOF"
|
||||
| If _ -> fail "nested if not supported"
|
||||
| Raw _ -> skip_block ~elseok ()
|
||||
| Endif -> top()
|
||||
| Endif -> pp_pos(); top()
|
||||
| Elseif (op,i,j) ->
|
||||
if elseok && eval ~major ~minor op i j then (
|
||||
pp_pos();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue