Scaladocs #18

Merged
gc1523 merged 8 commits from scaladocs into master 2025-02-07 16:50:14 +00:00
4 changed files with 80 additions and 38 deletions
Showing only changes of commit e38932a3e8 - Show all commits

View File

@@ -115,16 +115,15 @@ object parser {
((`<pair-elems-type>` <**> `<array-type>`)
.map(arr => (_: UntypedPairType) => arr) </> identity))
/** Statements
*
* Atomic is used in two places here:
* 1. Atomic for function return type - code may be a variable declaration instead, If we were
* to factor out the type, the resulting code would be rather messy. It can only fail once
* in the entire program so it creates minimal overhead.
* 2. Atomic for function missing return type check - there is no easy way around an explicit
* invalid syntax check, this only happens at most once per program so this is not a major
* concern.
*/
/* Statements
Atomic is used in two places here:
1. Atomic for function return type - code may be a variable declaration instead, If we were
to factor out the type, the resulting code would be rather messy. It can only fail once
in the entire program so it creates minimal overhead.
2. Atomic for function missing return type check - there is no easy way around an explicit
invalid syntax check, this only happens at most once per program so this is not a major
concern.
*/
private lazy val `<program>` = Program(
"begin" ~> many(
atomic(`<type>`.label("function declaration") <~> `<ident>` <~ "(") <**> `<partial-func-decl>`