From 8ceb48a4e60b8ff89f28372da4f66cd152e2e0fe Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 13 Jul 2026 23:59:36 +0200 Subject: Change record constructor syntax --- doc/appendix.tex | 13 ++++++++----- doc/type-system.tex | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/appendix.tex b/doc/appendix.tex index e98da0c..71b0cc4 100644 --- a/doc/appendix.tex +++ b/doc/appendix.tex @@ -73,8 +73,13 @@ \alt{} \alt{} \alt{} + \alt{} \alt{} `(' `)'. + = `\{' [ \{`,' \}] `\}'. + + = `:' . + = | . = \{ \}. @@ -142,9 +147,7 @@ | | | | | | $\varepsilon{}$. - = [`begin' - \alt{} `return' - \alt{} `begin' `;' `return' ]. + = [`begin' ]. = `:=' . @@ -167,7 +170,7 @@ = `(' [ \{`;' \}] `)' . - = `end'. + = [`return' ] `end'. = `proc' \\ ( | `extern'). @@ -175,5 +178,5 @@ = \{\} - `end' `.\@'. + [`return' ] `end' `.\@'. \end{grammar} diff --git a/doc/type-system.tex b/doc/type-system.tex index e1497be..102b0e4 100644 --- a/doc/type-system.tex +++ b/doc/type-system.tex @@ -65,7 +65,7 @@ end. = `(' [ \{`;' \}] `)' . - = `end'. + = [`return' ] `end'. = `proc' \\ ( | `extern'). @@ -109,7 +109,7 @@ type var u: U; begin - u := U(0, 1, 2); + u := U{x: 0, y: 1, z: 2}; u.x := 3 end. \end{lstlisting} -- cgit v1.2.3