summaryrefslogtreecommitdiff
path: root/src/parser.mly
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.mly')
-rw-r--r--src/parser.mly15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/parser.mly b/src/parser.mly
index a079886..5594430 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -71,19 +71,20 @@ prog:
declaration:
| p = proto
b = block
- { [ DFunction(p, b) ] }
+ { [ { d_loc = $startpos, $endpos; d_desc = DFunction(p, b) } ] }
| vars = typed_vars
SEMICOLON
- { List.map (fun k -> DGlobal(k)) vars }
+ { List.map (fun k -> { d_loc = $startpos, $endpos; d_desc = DGlobal(k) }) vars }
| n = cls
s = supers? LBRACE PUBLIC COLON
m = member* RBRACE SEMICOLON
{
- [ DClass({
- c_name = n;
- c_supers = s;
- c_members = List.flatten m;
- }) ]
+ [ { d_loc = $startpos, $endpos;
+ d_desc =DClass({
+ c_name = n;
+ c_supers = s;
+ c_members = List.flatten m;
+ }) } ]
}
;