From 97bbe98289fb74c7cf2d9793b80a1a27b4146045 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 8 Oct 2020 13:01:18 +0800 Subject: change file extension moonp. --- spec/inputs/string.mp | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 spec/inputs/string.mp (limited to 'spec/inputs/string.mp') diff --git a/spec/inputs/string.mp b/spec/inputs/string.mp new file mode 100644 index 0000000..5d8f772 --- /dev/null +++ b/spec/inputs/string.mp @@ -0,0 +1,66 @@ + +hi = "hello" +hello = "what the heckyes" +print hi + +umm = 'umm' + +here, another = "yeah", 'world' + +aye = "YU'M" +you '"hmmm" I said' + +print aye, you + +another = [[ hello world ]] + + +hi_there = [[ + hi there +]] + +well = [==[ "helo" ]==] + +hola = [===[ + eat noots]===] + +mm = [[well trhere]] + +oo = "" + +x = "\\" +x = "a\\b" +x = "\\\n" +x = "\"" + +-- + +a = "hello #{hello} hello" +b = "#{hello} hello" +c = "hello #{5+1}" +d = "#{hello world}" +e = "#{1} #{2} #{3}" + +f = [[hello #{world} world]] + +-- + +a = 'hello #{hello} hello' +b = '#{hello} hello' +c = 'hello #{hello}' + + +-- + +_ = "hello" +"hello"\format 1 +"hello"\format(1,2,3) +"hello"\format(1,2,3) 1,2,3 + +"hello"\world! +"hello"\format!.hello 1,2,3 +"hello"\format 1,2,3 + +something"hello"\world! +something "hello"\world! + -- cgit v1.2.3-55-g6feb