diff --git a/eo-parser/src/main/resources/org/eolang/parser/parse/expand-aliases.xsl b/eo-parser/src/main/resources/org/eolang/parser/parse/expand-aliases.xsl index 91437e9823..98d616590f 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/parse/expand-aliases.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/parse/expand-aliases.xsl @@ -35,18 +35,35 @@ SOFTWARE. --> - + + - - + + - + + + + + + + + + + + + + + + + + Q. @@ -56,13 +73,26 @@ SOFTWARE. - + + + + + + + - + + + + + + + + diff --git a/eo-parser/src/main/resources/org/eolang/parser/parse/resolve-aliases.xsl b/eo-parser/src/main/resources/org/eolang/parser/parse/resolve-aliases.xsl index a7444ae51b..45f9dfffb2 100644 --- a/eo-parser/src/main/resources/org/eolang/parser/parse/resolve-aliases.xsl +++ b/eo-parser/src/main/resources/org/eolang/parser/parse/resolve-aliases.xsl @@ -41,7 +41,7 @@ SOFTWARE. - + diff --git a/eo-parser/src/test/resources/org/eolang/parser/eo-packs/parse/expand-aliases.yaml b/eo-parser/src/test/resources/org/eolang/parser/eo-packs/parse/expand-aliases.yaml index c79b41f9c9..8d33665c25 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/eo-packs/parse/expand-aliases.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/eo-packs/parse/expand-aliases.yaml @@ -27,9 +27,13 @@ asserts: - /program[not(errors)] - //meta[head='alias' and tail='scanner Q.org.eolang.txt.scanner' and part[1]='scanner' and part[2]='Q.org.eolang.txt.scanner'] - //meta[head='alias' and tail='stdin Q.org.eolang.io.stdin' and part[1]='stdin' and part[2]='Q.org.eolang.io.stdin'] + - //meta[head='alias' and tail='a b Q.c' and part[1]='a' and part[2]='b' and part[3]='Q.c'] + - //meta[head='alias' and tail='a b c e Q.f' and part[1]='a' and part[2]='b' and part[3]='c' and part[4]='e' and part[5]='Q.f'] input: | +alias org.eolang.txt.scanner +alias stdin org.eolang.io.stdin + +alias a b c + +alias a b c e f # No comments. [args] > main diff --git a/eo-parser/src/test/resources/org/eolang/parser/eo-packs/parse/resolve-aliases.yaml b/eo-parser/src/test/resources/org/eolang/parser/eo-packs/parse/resolve-aliases.yaml index 1e5849a283..b3ea4b6730 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/eo-packs/parse/resolve-aliases.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/eo-packs/parse/resolve-aliases.yaml @@ -29,17 +29,21 @@ sheets: asserts: - /program[not(errors)] - /program/objects[count(o)=1] - - /program/metas/meta[head='foo' and @line='4'] - - /program/metas[count(meta)=4] + - /program/metas/meta[head='foo'] + - /program/metas[count(meta)=6] - //o[@base='Q.org.eolang.txt.scanner'] - - //o[@base='Q.org.eolang.io.stdout' and @line='10'] - - //o[@base='and' and @line='8'] + - //o[@base='Q.org.eolang.io.stdout'] + - //o[@base='and'] - //o[@base='$'] - //o[@base='^'] + - //o[@base='Q.org.eolang.txt.regex'] + - //o[@base='Q.org.d'] input: | +alias org.eolang.txt.scanner +alias stdin org.eolang.io.stdin +alias stdout org.eolang.io.stdout + +alias custom org.eolang.txt.regex + +alias a b c org.d +foo Some other meta # No comments. @@ -49,3 +53,5 @@ input: | (stdout "You entered" line).print ^.x $ + custom 5 + a