fix: uses correct comment syntax for comments on design justifications

This commit is contained in:
Guy C 2025-02-07 16:36:00 +00:00
parent 764e335364
commit e38932a3e8

View File

@ -115,16 +115,15 @@ object parser {
((`<pair-elems-type>` <**> `<array-type>`) ((`<pair-elems-type>` <**> `<array-type>`)
.map(arr => (_: UntypedPairType) => arr) </> identity)) .map(arr => (_: UntypedPairType) => arr) </> identity))
/** Statements /* Statements
* Atomic is used in two places here:
* Atomic is used in two places here: 1. Atomic for function return type - code may be a variable declaration instead, If we were
* 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
* 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.
* 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
* 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
* invalid syntax check, this only happens at most once per program so this is not a major concern.
* concern. */
*/
private lazy val `<program>` = Program( private lazy val `<program>` = Program(
"begin" ~> many( "begin" ~> many(
atomic(`<type>`.label("function declaration") <~> `<ident>` <~ "(") <**> `<partial-func-decl>` atomic(`<type>`.label("function declaration") <~> `<ident>` <~ "(") <**> `<partial-func-decl>`