From 77ad1eda25426647788e2bbc93dfbdefadc8debf Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Mon, 10 May 2021 14:22:55 +0300 Subject: [PATCH] Added description of parser implementation --- rfcs/syntax-named-function-type-args.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rfcs/syntax-named-function-type-args.md b/rfcs/syntax-named-function-type-args.md index 8c09f281..542c6fa4 100644 --- a/rfcs/syntax-named-function-type-args.md +++ b/rfcs/syntax-named-function-type-args.md @@ -42,6 +42,9 @@ This feature can be found in other languages: Implementation will store the names inside the function type description. +Parsing the argument list will require a single-token lookahead that we already support. +Argument list parser will check if current token is an identifier and if the lookahead token is a colon, in which case it will consume both tokens. + Function type comparisons will ignore the argument names, this proposal doesn't change the semantics of the language and how typechecking is performed. ## Drawbacks