Closed k4rtik closed 1 year ago
I see that currently it's left as a TODO in the implementation to provide a precedence value for lambda expressions.
But the associated issue is closed with the rationale documented in https://github.com/microsoft/qsharp-compiler/issues/1358#issuecomment-1041086604 that suggests to document it in the spec without specifying lambdas under the operators table of precedence.
It seems the de facto precedence in the reference implementation is in termParser function at https://github.com/microsoft/qsharp-compiler/blob/05098e1a1c077198d28c7313066b6565c1496524/src/QsCompiler/TextProcessor/QsExpressionParsing.fs#L702-L719
termParser
I think it will be nice to provide an explicit precedence value for lambdas in the spec as it is currently quite confusing to figure out.
I see that currently it's left as a TODO in the implementation to provide a precedence value for lambda expressions.
But the associated issue is closed with the rationale documented in https://github.com/microsoft/qsharp-compiler/issues/1358#issuecomment-1041086604 that suggests to document it in the spec without specifying lambdas under the operators table of precedence.
It seems the de facto precedence in the reference implementation is in
termParser
function at https://github.com/microsoft/qsharp-compiler/blob/05098e1a1c077198d28c7313066b6565c1496524/src/QsCompiler/TextProcessor/QsExpressionParsing.fs#L702-L719I think it will be nice to provide an explicit precedence value for lambdas in the spec as it is currently quite confusing to figure out.