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

More tests of positions.

parent d76cc109
......@@ -13,7 +13,7 @@ type optional_comma =
positions * nothing option
type annotations =
positions * position * position * optional_dot * optional_comma
positions * position * position * int * optional_dot * optional_comma
type raw_expr =
| EInt
......@@ -66,10 +66,11 @@ module Print = struct
positions "optional_comma" poss;
iter nothing no
let annotations (poss, pos1, pos2, odot, ocomma) =
let annotations (poss, pos1, pos2, ofs3, odot, ocomma) =
positions "annotations" poss;
position "annotations: $endpos($1)" pos1;
position "annotations: $startpos($2)" pos2;
offset "annotations: $startofs" ofs3;
optional_dot odot;
optional_comma ocomma
......
......@@ -39,7 +39,7 @@ optional_dot:
%inline annotations:
optional_dot optional_comma
{ ($startpos, $endpos),
$endpos($1), $startpos($2),
$endpos($1), $startpos($2), $startofs,
$1, $2 }
raw_expr:
......
......@@ -46,7 +46,7 @@ optional_comma:
annotations:
optional_dot optional_comma
{ (Parsing.rhs_start_pos 1, Parsing.symbol_end_pos()),
Parsing.rhs_end_pos 1, Parsing.rhs_start_pos 2,
Parsing.rhs_end_pos 1, Parsing.rhs_start_pos 2, Parsing.rhs_start 1,
$1, $2 }
raw_expr:
......
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