From 2727278bb75dafc4f8177328812cbadd12258fc6 Mon Sep 17 00:00:00 2001 From: Pietra Ferreira Date: Tue, 28 Nov 2023 14:42:01 -0300 Subject: [PATCH] vault backup: 2023-11-28 14:42:01 Affected files: content/notes/university/year3/cs3072/cs3072-design.md --- .../university/year3/cs3072/cs3072-design.md | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/content/notes/university/year3/cs3072/cs3072-design.md b/content/notes/university/year3/cs3072/cs3072-design.md index c9ffef4220a1..870f8dc4ac4d 100644 --- a/content/notes/university/year3/cs3072/cs3072-design.md +++ b/content/notes/university/year3/cs3072/cs3072-design.md @@ -202,4 +202,26 @@ These concepts ensure memory safety without the need for a garbage collector. Ow - Yacc, Antlr (grammars) - Treesitter (use parser generator) - Focus on tool, work on questions (almost good!) -- Apply to BREO before the holidays \ No newline at end of file +- Apply to BREO before the holidays + +``` +let_declaration: $ => seq( + 'let', + optional($.mutable_specifier), + field('pattern', $._pattern), + optional(seq( + ':', + field('type', $._type), + )), + optional(seq( + '=', + field('value', $._expression), + )), + optional(seq( + 'else', + field('alternative', $.block), + )), + ';', + ), +``` +