-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(#412): removed the empty object warning for lambda objects #415
base: master
Are you sure you want to change the base?
Conversation
@h1alexbel please, review this one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Marat-Tim please check my comments
@@ -0,0 +1,15 @@ | |||
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Marat-Tim let's rename this pack to allows-lambda-object-in-atom.yaml
<xsl:import href="/org/eolang/funcs/lineno.xsl"/> | ||
<xsl:import href="/org/eolang/funcs/escape.xsl"/> | ||
<xsl:output encoding="UTF-8" method="xml"/> | ||
<xsl:template match="/"> | ||
<defects> | ||
<xsl:for-each select="/program/objects//o[not(@base) and not(o) and not(eo:atom(.))]"> | ||
<xsl:for-each select="/program/objects//o[not(@base) and not(o) and not(eo:atom(.)) and not(@name=$eo:lambda)]"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Marat-Tim we also should check that object with @name=$eo:lambda
is placed inside the atom. Currently it is legal to have such XMIR (we need to complain instead):
<program>
<objects>
<o name="λ"/>
</objects>
</program>
@name="λ"
should be allowed only inside atom. The following XMIR should be warning-free:
<program>
<objects>
<o name="name">
<o name="λ"/>
</o>
</objects>
</program>
It seems to be in the eo repository in the file https://github.com/objectionary/eo/blob/master/eo-parser/src/main/resources/org/eolang/parser/_funcs.xsl there is a problem with the atom function, as it checks that the nested one, not the current one, has the name
lambda