diff --git a/eo-maven-plugin/pom.xml b/eo-maven-plugin/pom.xml index b77c67f463..1e6ae6402d 100644 --- a/eo-maven-plugin/pom.xml +++ b/eo-maven-plugin/pom.xml @@ -42,7 +42,7 @@ SOFTWARE. org.eolang lints - 0.0.16 + 1.0-SNAPSHOT com.yegor256 diff --git a/eo-parser/src/main/resources/org/eolang/parser/optimize/abstracts-float-up.xsl b/eo-parser/src/main/resources/org/eolang/parser/optimize/abstracts-float-up.xsl index efbd5f0686..e6de2e5c91 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/optimize/abstracts-float-up.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/optimize/abstracts-float-up.xsl @@ -116,7 +116,7 @@ SOFTWARE. - + diff --git a/eo-parser/src/test/resources/org/eolang/parser/packs/float-atom-vars.yaml b/eo-parser/src/test/resources/org/eolang/parser/packs/float-atom-vars.yaml new file mode 100644 index 0000000000..8bc6bf9340 --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/packs/float-atom-vars.yaml @@ -0,0 +1,33 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +--- +xsls: + - /org/eolang/parser/add-refs.xsl + - /org/eolang/parser/vars-float-up.xsl +tests: + - //objects[not(o[@atom and @base])] + - //objects[not(o[@atom and o[@base]])] + - //o[@atom and o[not(@base)]] +eo: | + # Test. + [] > main + [x] > foo /number diff --git a/eo-parser/src/test/resources/org/eolang/parser/packs/optimize/float-atom.yaml b/eo-parser/src/test/resources/org/eolang/parser/packs/optimize/float-atom.yaml index 7a5be97f92..ce26de2f81 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/packs/optimize/float-atom.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/packs/optimize/float-atom.yaml @@ -28,8 +28,9 @@ xsls: - /org/eolang/parser/optimize/fix-missed-names.xsl - /org/eolang/parser/clean-up.xsl tests: - - //objects[not(o[@atom and o[@base]])] - - //o[@atom and o[not(@base) and x]] + - //objects[not(//o[@atom and @base])] + - //objects[not(//o[@atom and o[@base]])] + - //o[@atom and o[not(@base)]] eo: | # Test. [] > main