Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Jan 22, 2024
2 parents ba5f30b + 8fb6c04 commit cbcd686
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,11 @@ SOFTWARE.
</xsl:template>
<!-- DATA -->
<xsl:template match="o[@data]" mode="head">
<xsl:param name="indent"/>
<xsl:choose>
<xsl:when test="@data='string'">
<xsl:text>"""</xsl:text>
<xsl:value-of select="$eol"/>
<xsl:if test="not(empty(text()))">
<xsl:value-of select="$indent"/>
<xsl:value-of select="text()"/>
<xsl:value-of select="$eol"/>
</xsl:if>
<xsl:value-of select="$indent"/>
<xsl:text>"""</xsl:text>
<xsl:text>"</xsl:text>
<xsl:value-of select="text()"/>
<xsl:text>"</xsl:text>
</xsl:when>
<xsl:when test="@data='bool' or @data='int' or @data='float'">
<xsl:value-of select="text()"/>
Expand Down
13 changes: 3 additions & 10 deletions eo-parser/src/main/resources/org/eolang/parser/xmir-to-eo.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,11 @@ SOFTWARE.
</xsl:template>
<!-- DATA -->
<xsl:template match="o[@data]" mode="head">
<xsl:param name="indent"/>
<xsl:choose>
<xsl:when test="@data='string'">
<xsl:text>"""</xsl:text>
<xsl:value-of select="$eol"/>
<xsl:if test="not(empty(text()))">
<xsl:value-of select="$indent"/>
<xsl:value-of select="text()"/>
<xsl:value-of select="$eol"/>
</xsl:if>
<xsl:value-of select="$indent"/>
<xsl:text>"""</xsl:text>
<xsl:text>"</xsl:text>
<xsl:value-of select="text()"/>
<xsl:text>"</xsl:text>
</xsl:when>
<xsl:when test="@data='bool' or @data='int' or @data='float'">
<xsl:value-of select="text()"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
origin: |
EA-EA-EA-EA > xs
"""
hello
""" > ys
"hello" > ys
TRUE > b1
Expand All @@ -12,9 +10,7 @@ origin: |
strait: |
EA-EA-EA-EA > xs
"""
hello
""" > ys
"hello" > ys
TRUE > b1
Expand All @@ -23,9 +19,7 @@ strait: |
reversed: |
EA-EA-EA-EA > xs
"""
hello
""" > ys
"hello" > ys
TRUE > b1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ strait: |
QQ
.txt
.sprintf
"""
"""
""
reversed: |
[] > app
Expand All @@ -22,5 +21,4 @@ reversed: |
sprintf.
txt.
QQ
"""
"""
""
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,17 @@ strait: |
this
n
.minus
"""
\u5BB6
"""
"\u5BB6"
4.55 > x!
*
"""
Hello, \u0434\u0440\u0443\u0433
"""
"Hello, \u0434\u0440\u0443\u0433"
2.18
TRUE
.plus
bar
n
.plus
"""
hello, \u5927\u5BB6!
"""
"hello, \u5927\u5BB6!"
.if > @
reversed: |
Expand All @@ -80,19 +74,13 @@ reversed: |
this
minus.
n
"""
\u5BB6
"""
"\u5BB6"
4.55 > x!
*
"""
Hello, \u0434\u0440\u0443\u0433
"""
"Hello, \u0434\u0440\u0443\u0433"
2.18
TRUE
bar
plus.
n
"""
hello, \u5927\u5BB6!
"""
"hello, \u5927\u5BB6!"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
origin: |
[] > app
QQ.io.stdout > @
"""
Hello
it's me
"""
strait: |
[] > app
QQ
.io
.stdout > @
"Hello\nit's me"
reversed: |
[] > app
stdout. > @
io.
QQ
"Hello\nit's me"
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ origin: |
strait: |
* > array
1
"""
Hello
"""
"Hello"
x
reversed: |
* > array
1
"""
Hello
"""
"Hello"
x
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ strait: |
QQ
.txt
.sprintf
"""
result is %d\n
"""
"result is %d\n"
-1
.times
228
Expand All @@ -28,9 +26,7 @@ reversed: |
sprintf.
txt.
QQ
"""
result is %d\n
"""
"result is %d\n"
times.
-1
228

0 comments on commit cbcd686

Please sign in to comment.