Commit a9462e67 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Lexer: fix error position when a semantic action is unclosed.

parent 48d74019
......@@ -431,12 +431,13 @@ rule main = parse
) }
| "{"
{ savestart lexbuf (fun lexbuf ->
let openingpos = lexeme_end_p lexbuf in
let openingpos = lexeme_start_p lexbuf in
let stretchpos = lexeme_end_p lexbuf in
let closingpos, monsters = action false openingpos [] lexbuf in
ACTION (
fun (producers : string option array) ->
List.iter (fun monster -> monster.check producers) monsters;
let stretch = mk_stretch openingpos closingpos true monsters in
let stretch = mk_stretch stretchpos closingpos true monsters in
Action.from_stretch stretch
)
) }
......
Supports Markdown
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