-
Notifications
You must be signed in to change notification settings - Fork 7
Support ArgumentLists #27
Comments
@nex3 why |
hmm, is it related to the fact that ArgumentList could be passed as a value for a regular argument as well rather than being only related to variable arguments of the current function calls, which could mean we have ArgumentList values elsewhere in the arguments ? |
Exactly. A Sass function written in Sass can pass around an argument list as a normal value, including passing it to other functions, which may include custom functions. In all of these cases, we want to track whether the keywords were accessed for each individual |
This is necessary to properly forward argument list keywords to the embedded compiler. See sass/embedded-protocol#27
This is necessary to properly forward argument list keywords to the embedded compiler. See sass/embedded-protocol#27
This is necessary to properly forward argument list keywords to the embedded compiler. See sass/embedded-protocol#27
This is necessary to properly forward argument list keywords to the embedded compiler. See sass/embedded-protocol#27
The protocol currently mandates that outbound function calls pass variable argument lists "as
Value.ArgumentList
s", but it doesn't actually define aValue.ArgumentList
type. We should do so.Argument lists pose a particular challenge in that they care about whether their associated keyword arguments were used in practice or not. The compiler throws an error if keyword arguments were passed but not used, since function signatures don't distinguish between taking variable length positional versus keyword arguments, and we want users to have feedback when passing keyword arguments to a function that doesn't accept them.
I think we want to handle this by always passing keyword arguments for each argument list, and adding a
repeated int keywords_accessed
field toInboundMessage.FunctionCallResponse
that indicates which arguments' keywords were accessed in practice. Then the compiler can use this to generate errors where appropriate.The text was updated successfully, but these errors were encountered: