summaryrefslogtreecommitdiff
path: root/src/taiga.lalrpop
diff options
context:
space:
mode:
authorDavid Li <li.davidm96@gmail.com>2017-11-06 09:00:14 -0500
committerDavid Li <li.davidm96@gmail.com>2017-11-06 09:00:14 -0500
commit48411d44fd742800348dace427217a9b5727138d (patch)
tree06edd036fcd1b67d3fa5805442a8c0055c7e9140 /src/taiga.lalrpop
parent58f30a0ce9e8bb0dde99edcbbaf8e1b7757e2ee6 (diff)
Reimplement checking of variable bindings
Diffstat (limited to 'src/taiga.lalrpop')
-rw-r--r--src/taiga.lalrpop3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/taiga.lalrpop b/src/taiga.lalrpop
index afa6433..0c7fea0 100644
--- a/src/taiga.lalrpop
+++ b/src/taiga.lalrpop
@@ -29,7 +29,8 @@ Parameters: WithLocation<Vec<WithLocation<ast::RecordField>>> = {
Ty: WithLocation<ast::Ty> = {
<Name> => <>.map(|v| ast::Ty::Name(v)),
- "array" "of" <Name> => <>.map(|v| ast::Ty::Array(Box::new(ast::Ty::Name(v)))),
+ <l: @L> "array" "of" <n: Name> <r: @R> =>
+ WithLocation::new(ast::Ty::Array(Box::new(n.map(|v| ast::Ty::Name(v)))), l, r),
<RecordFields> => <>.map(|v| ast::Ty::Record(v)),
};