Skip to content

Commit

Permalink
#3592: no comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 3, 2024
1 parent b7070ec commit 8397802
Show file tree
Hide file tree
Showing 80 changed files with 157 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void detectsErrorsSuccessfully(@Mktmp final Path temp) throws IOException {
final FakeMaven maven = new FakeMaven(temp)
.withProgram(
"+package f\n",
"# Test.",
"# No comments.",
"[] > main",
" QQ.io.stdout",
" \"Hello world\""
Expand Down Expand Up @@ -227,7 +227,7 @@ void failsOnWarning(@Mktmp final Path temp) {
"+architect [email protected]",
"+tests",
"+package org.eolang.examples\n",
"# Test.",
"# No comments.",
"[] > main",
" [] > @",
" hello > test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ void getsAlreadyPulledResultsFromCache(@Mktmp final Path temp) throws Exception
);
new FakeMaven(temp)
.withProgram(
"# Test.",
"# No comments.",
"[] > app",
" QQ.io.stdout > @"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# SOFTWARE.
---
eo: |
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > test
([] (^ > x)).plus > s
int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
origin: |
+package sandbox
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[args] > main
QQ.io.stdout > @
args.at
Expand Down
10 changes: 5 additions & 5 deletions eo-parser/src/test/java/org/eolang/parser/EoSyntaxTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void parsesSimpleCode() throws Exception {
void printsProperListingEvenWhenSyntaxIsBroken() throws Exception {
final String src = String.join(
"\n",
"# This is the default 64+ symbols comment in front of abstract object.",
"# No comments.",
"[] > x-н, 1\n"
);
MatcherAssert.assertThat(
Expand Down Expand Up @@ -127,9 +127,9 @@ void copiesListingCorrectly() throws Exception {
"1 > x\r\n\r\n2 > y",
"1 > x\n2 > y\n",
"1 > x\n\n2 > y",
"# This is the default 64+ symbols comment in front of abstract object.\n[] > x",
"# No comments.\n[] > x",
"a b c > x\n x ^ > @",
"# This is the default 64+ symbols comment in front of abstract object.\n[] > x\n x ^ > @"
"# No comments.\n[] > x\n x ^ > @"
})
void parsesSuccessfully(final String code) {
final EoSyntax syntax = new EoSyntax(
Expand Down Expand Up @@ -160,10 +160,10 @@ void parsesArrow() throws IOException {
void prasesNested() throws IOException {
final String src = String.join(
"\n",
"# This is the default 64+ symbols comment in front of abstract object.",
"# No comments.",
"[] > base",
" memory 0 > x",
" # This is the default 64+ symbols comment in front of abstract object.",
" # No comments.",
" [self] > f",
" v > @",
" v\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ eo: |
+home www.abc.com
+version 0.0.0
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > a
b > @
x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ tests:
- //metas[count(.//meta[head/text()='probe'])=1]
- /program/sheets[sheet='add-probes']
eo: |
# Test.
# No comments.
[] > app
Q.foo.boom > @
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ eo: |
+package org.eolang.custom
+version 0.0.0
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > app
QQ.txt.sprintf > @
"Hello, world!\n"
Expand All @@ -50,14 +50,14 @@ eo: |
fibonacci n > f
true
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[i] > other
stdout > @
sprintf
"%i"
$.other 1 > one
memory 0 > price
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[p] > set-price
^.price.write p > @
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ eo: |
+package org.eolang.custom
+version 0.0.0
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > app
QQ.cage|0.28.10 > cg-versioned
QQ.cage > cg-simple
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ eo: |
+alias stdout org.eolang.io.stdout
+foo Some other meta
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[args] > main
and
(scanner stdin).next-line > line!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ tests:
- /program[not(metas)]
- /program/sheets[sheet='add-probes']
eo: |
# Test.
# No comments.
[] > app
42 > @
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tests:
- //o[@base='x' and @line='18' and @ref='16']
- //o[@base='first' and @line='19' and @ref='2']
eo: |
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[x a] > first
stdout x
second > hello
Expand All @@ -48,13 +48,13 @@ eo: |
x
something > a
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[a] > x
tt
x 4
first
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > y
one
[f]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tests:
- //o[@base='.as-bytes' and @line and @pos and @name='y' and o[@base='org.eolang.dataized' and o[@base='org.eolang.c' and not(@name)]]]
- //objects[count(//o[@const])=0]
eo: |
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > foo
number > x!
# This is the default 64+ symbols comment in front of named abstract object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ tests:
- /program/errors/error[text()='This method is deprecated!']

eo: |
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > foo
cti > @
2.times 2
"error"
"This method is deprecated!"
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > app
QQ.io.stdout > @
QQ.txt.sprintf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ tests:
- /program/errors/error[text()='This method is deprecated!']

eo: |
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > foo
cti > @
2.times 2
"warning"
"This method is deprecated!"
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > app
QQ.io.stdout > @
QQ.txt.sprintf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ eo: |
+package test
+version 0.0.0
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[x] > foo
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > y
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tests:
eo: |
+alias QQ.txt.sprintfQQ
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > app
QQ.io.stdout > @
"Hello, world!\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ eo: |
+alias org.eolang.txt.scanner
+alias stdin org.eolang.io.stdin
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[args] > main
and
(scanner stdin).next-line > line!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ tests:
- //objects[not(o[@atom and o[@base]])]
- //o[@atom and o[not(@base)]]
eo: |
# Test.
# No comments.
[] > main
[x] > foo /number
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ xsls:
tests:
- /program[count(.//o[@base='build' and not(@ref)])=2]
eo: |
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > hello
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[f s] > calc
plus. > @
f.next
Expand All @@ -42,13 +42,13 @@ eo: |
"Result is %d\n"
calc
[]
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[x] > build
x.plus 1 > @
build (@.plus 1) > next
build 1 > @
[]
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[y] > build
y.plus 2 > @
build (@.plus 2) > next
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,30 @@ tests:
- //o[@name='mm' and @base='number']
- //o[@base='mm']
eo: |
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > x
first > ff
one
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > y
two
input > t!
"Hello, world!"
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > oops
50
three t
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > last
three 1
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[ppp] > pp
one
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[aaa] > kkk
1 > ooo
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > head
bb > @
[zz]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ eo: |
500.43.@ > one
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
"Hello, друг!" > hello!
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[tt a] > atom /int
# This is very good object
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[x] > first
x > @
second > hello
Expand Down Expand Up @@ -101,14 +101,14 @@ eo: |
b
oops
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > obj
"some" > @
[] > foo
^.@ > @
# Comments are allowed only in front of top-level objects
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > named
one.two.three.four.five
t.o
Expand All @@ -121,7 +121,7 @@ eo: |
me
(now (f (f (f (f 1)))).f):i
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > ooo
[] > o-1 /?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ xsls: [ ]
tests:
- /comment()[1]
eo: |
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > main
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ eo: |
+package test
+version 0.0.0
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[args] > main
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[y] > leap
or. > @
and.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ tests:
eo: |
+package org.eolang
# This is the default 64+ symbols comment in front of abstract object.
# No comments.
[] > bytes
$.eq 01- > yes
Loading

0 comments on commit 8397802

Please sign in to comment.