summaryrefslogtreecommitdiff
path: root/src/taiga.lalrpop
diff options
context:
space:
mode:
authorDavid Li <li.davidm96@gmail.com>2017-11-06 09:26:23 -0500
committerDavid Li <li.davidm96@gmail.com>2017-11-06 09:26:23 -0500
commit5b137e0983051bf72759cea9c4af1c4bc7a24e1f (patch)
treeb1ef7efe6dbacbe3f37275fd829c8cc9eb19551c /src/taiga.lalrpop
parente4dfafc26756b6e9fe3df445efb5a14d4cab3e31 (diff)
Type check record definitions
Diffstat (limited to 'src/taiga.lalrpop')
-rw-r--r--src/taiga.lalrpop6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/taiga.lalrpop b/src/taiga.lalrpop
index 0c7fea0..bad60bb 100644
--- a/src/taiga.lalrpop
+++ b/src/taiga.lalrpop
@@ -8,13 +8,13 @@ pub Program: ast::Program = {
};
FieldList: Vec<WithLocation<ast::RecordField>> = {
- <l: @L> <n:Name> ":" <v:Name> <r: @R> "," <rest: FieldList> => {
+ <l: @L> <n:Name> ":" <v:Ty> <r: @R> "," <rest: FieldList> => {
let mut rest = rest;
rest.push(WithLocation::new(ast::RecordField::new(n, v), l, r));
rest
},
- <l: @L> <n:Name> ":" <v:Name> <r: @R> "," => vec![WithLocation::new(ast::RecordField::new(n, v), l, r)],
- <l: @L> <n:Name> ":" <v:Name> <r: @R> => vec![WithLocation::new(ast::RecordField::new(n, v), l, r)],
+ <l: @L> <n:Name> ":" <v:Ty> <r: @R> "," => vec![WithLocation::new(ast::RecordField::new(n, v), l, r)],
+ <l: @L> <n:Name> ":" <v:Ty> <r: @R> => vec![WithLocation::new(ast::RecordField::new(n, v), l, r)],
};
RecordFields: WithLocation<Vec<WithLocation<ast::RecordField>>> = {