<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">Am Do., 3. Jan. 2019, 17:50 hat Ryan Joseph <<a href="mailto:ryan@thealchemistguild.com">ryan@thealchemistguild.com</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Jan 3, 2019, at 6:20 AM, Sven Barth via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank" rel="noreferrer">fpc-pascal@lists.freepascal.org</a>> wrote:<br>
> <br>
> Correct. ";" separates different parameter types, "," separates those of the same type. Though I agree with Mattias that "const T, const U" (with or without ": Integer") should not work (but then "T, const U" should also not work for consistency). <br>
> Essentially it should behave like a routine's parameter clause. <br>
<br>
I guess that makes sense that if a type parameter is followed by a const parameter then those are essentially different types and following the same logic should be separated with a semicolon.<br>
<br>
That means the parser only knows if a ; is required after the const keyword is found. Does that matter?<br></blockquote></div><div dir="auto"><br></div><div dir="auto">The approach should be like this:</div><div dir="auto">- const is allowed at the start of the parameters or after a ";" </div><div dir="auto">- a parameter name is either followed by a ",", ";", ":" or ">" (that should already be the case)</div><div dir="auto">- a ":" is either followed by a type constraint (for non const parameters) or a type name that allows constants (for const parameters); in either case this is followed by a ";" or the closing ">" </div><div dir="auto"><br></div><div dir="auto">I think that should cover everything 🤔</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>