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

Test that rhs_start_pos and rhs_end_pos correspond to $startpos($i) and $endpos($i).

parent 33a74641
......@@ -13,7 +13,7 @@ type optional_comma =
positions * nothing option
type annotations =
positions * optional_dot * optional_comma
positions * positions * optional_dot * optional_comma
type raw_expr =
| EInt
......@@ -55,8 +55,9 @@ module Print = struct
positions "optional_comma" poss;
iter nothing no
let annotations (poss, odot, ocomma) =
positions "annotations" poss;
let annotations (poss1, poss2, odot, ocomma) =
positions "annotations" poss1;
positions "annotations(internal)" poss2;
optional_dot odot;
optional_comma ocomma
......
......@@ -38,7 +38,9 @@ optional_dot:
%inline annotations:
optional_dot optional_comma
{ ($startpos, $endpos), $1, $2 }
{ ($startpos, $endpos),
($endpos($1), $startpos($2)),
$1, $2 }
raw_expr:
| INT
......
......@@ -45,7 +45,9 @@ optional_comma:
annotations:
optional_dot optional_comma
{ (Parsing.rhs_start_pos 1, Parsing.symbol_end_pos()), $1, $2 }
{ (Parsing.rhs_start_pos 1, Parsing.symbol_end_pos()),
(Parsing.rhs_end_pos 1, Parsing.rhs_start_pos 2),
$1, $2 }
raw_expr:
| INT
......
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