September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1 +0,0 @@
auto s = q"[a string that you "don't" have to escape]";

View file

@ -1,6 +0,0 @@
writefln(q"EOS
This
is a multi-line
heredoc string
EOS"
);

View file

@ -0,0 +1,28 @@
// version 1.1.0
fun main(args: Array<String>) {
val ev = "embed variables"
val here = """
This is a raw string literal
which does not treat escaped characters
(\t, \b, \n, \r, \', \", \\, \$ and \u)
specially and can contain new lines,
indentation and other whitespace
within the string.
"Quotes" or doubled ""quotes"" can
be included without problem but not
tripled quotes.
It's also possible to $ev
in a raw string literal using string
interpolation.
If you need to include a
literal ${'$'} sign in a raw string literal then
don't worry you've just done it!
"""
println(here)
}

View file

@ -0,0 +1,9 @@
x:=
#<<<
"#<<< starts a block of lines that are concatenated verbatim
and fed into the parser as one line. #<<< ends the block.
Both #<<< tokens must start the line that is otherwise ignored
Note that is isn't a string, but arbitrary source " + 1 + 23;
#<<<
x.println();