Basic support for templates in ast, rest will come with types

This commit is contained in:
Nathan Braswell
2018-06-22 09:02:30 -04:00
parent a8d4b4eb7f
commit 6ffe7aee46
5 changed files with 130 additions and 20 deletions

View File

@@ -91,7 +91,7 @@ traits = "\(" WS trait_list WS "\)" ;
trait_list = trait_list WS "," WS scoped_identifier | scoped_identifier ;
adt_nonterm = "adt" ;
adt_def = adt_nonterm WS identifier WS "{" WS adt_option_list WS "}" ;
adt_def = adt_nonterm WS identifier WS "{" WS adt_option_list WS "}" | adt_nonterm WS identifier WS template_dec WS "{" WS adt_option_list WS "}" ;
adt_option_list = adt_option | adt_option WS "," WS adt_option_list ;
adt_option = identifier | identifier WS dec_type ;