aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux')
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux19
1 files changed, 10 insertions, 9 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
index bd1aca3b3..ec444b003 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux
@@ -117,14 +117,14 @@
["(" open_form]
[")" close_form]
+ ... Variant delimiters
+ ["{" open_variant]
+ ["}" close_variant]
+
... Tuple delimiters
["[" open_tuple]
["]" close_tuple]
- ... Record delimiters
- ["{" open_record]
- ["}" close_record]
-
["#" sigil]
["," digit_separator]
@@ -239,8 +239,9 @@
... Form and tuple syntax is mostly the same, differing only in the
... delimiters involved.
... They may have an arbitrary number of arbitrary Code nodes as elements.
- [form_parser ..close_form #.Form]
- [tuple_parser ..close_tuple #.Tuple]
+ [form_parser ..close_form #.Form]
+ [variant_parser ..close_variant #.Variant]
+ [tuple_parser ..close_tuple #.Tuple]
)
(inline: (record_parser parse where offset source_code)
@@ -254,7 +255,7 @@
(recur sourceFV (#.Item [field value] stack)))
(#.Left [source' error])
- (if (same? ..close_record error)
+ (if (same? ..close_variant error)
(#.Right [source'
[where (#.Record (list.reversed stack))]])
(#.Left [source' error])))))
@@ -292,8 +293,8 @@
[text.new_line] [text.carriage_return]
[..name_separator]
[..open_form] [..close_form]
+ [..open_variant] [..close_variant]
[..open_tuple] [..close_tuple]
- [..open_record] [..close_record]
[..text_delimiter]
[..sigil])
<digit_separator> (static ..digit_separator)]
@@ -517,8 +518,8 @@
(!close <close>)]
[..open_form ..close_form form_parser]
+ [..open_variant ..close_variant variant_parser]
[..open_tuple ..close_tuple tuple_parser]
- [..open_record ..close_record record_parser]
)]
(`` ("lux syntax char case!" char/0
[[(~~ (static text.space))