multi-line tests

This commit is contained in:
Umur Ozkul 2022-05-19 17:59:25 +02:00
parent 3371c51e94
commit 7ccb1d8108

View File

@ -199,4 +199,31 @@ describe("Peggy parse", () => {
}) })
}) })
describe("parsing new line", ()=>{
testParse(`
a +
b`, "{(::add :a :b)}")
testParse(`
x=
1`, "{:x = {1}}")
testParse(`
x=1
y=2`, "{:x = {1}; :y = {2}}")
testParse(`
x={
y=2;
y }
x`, "{:x = {:y = {2}; :y}; :x}")
testParse(`
x={
y=2
y }
x`, "{:x = {:y = {2}; :y}; :x}")
MySkip.testParse(`
x={
y=2
y
}
x`, "{:x = {:y = {2}; :y}; :x}") //FIXME: Bracket after new line is not parsed
})