From ea543ce9232e5bbd9054d13ba8f4866e6b3720de Mon Sep 17 00:00:00 2001 From: Arthur Paulino Date: Thu, 26 Oct 2023 14:59:48 -0300 Subject: [PATCH] turn comments around 'Syntax' into docstrings --- src/syntax.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/syntax.rs b/src/syntax.rs index 4e6a86dc42..1ba2690b4e 100644 --- a/src/syntax.rs +++ b/src/syntax.rs @@ -15,23 +15,24 @@ use crate::uint::UInt; #[cfg(not(target_arch = "wasm32"))] use proptest::prelude::*; -// Lurk syntax +/// Lurk's syntax for parsing #[derive(Clone, Debug, PartialEq, Eq)] pub enum Syntax { + /// An element of the finite field `F` Num(Pos, Num), - // A u64 integer: 1u64, 0xffu64 + /// A u64 integer: 1u64, 0xffu64 UInt(Pos, UInt), - // A hierarchical symbol foo, foo.bar.baz or keyword :foo + /// A hierarchical symbol: foo, foo.bar.baz or keyword :foo Symbol(Pos, SymbolRef), - // A string literal: "foobar", "foo\nbar" + /// A string literal: "foobar", "foo\nbar" String(Pos, String), - // A character literal: #\A #\λ #\u03BB + /// A character literal: 'A', 'λ' Char(Pos, char), - // A quoted expression: 'a, '(1 2) + /// A quoted expression: 'a, '(1 2) Quote(Pos, Box>), - // A nil-terminated cons-list of expressions: (1 2 3) + /// A nil-terminated cons-list of expressions: (1 2 3) List(Pos, Vec>), - // An improper cons-list of expressions: (1 2 . 3) + /// An improper cons-list of expressions: (1 2 . 3) Improper(Pos, Vec>, Box>), }