2020-07-19 19:58:34 +02:00
|
|
|
fn main() {
|
|
|
|
_ = 1 == 2
|
|
|
|
}
|
2021-04-02 16:26:53 +02:00
|
|
|
|
|
|
|
fn block_comments() {
|
|
|
|
/* tab to indent the comment
|
2021-04-03 12:16:49 +02:00
|
|
|
spaces before
|
|
|
|
also spaces before
|
|
|
|
same here */
|
|
|
|
/* spaces for comment indentation (ouch)
|
|
|
|
and inside too
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
fn space_inside_strings() {
|
2021-04-12 15:03:22 +02:00
|
|
|
// Plain strings
|
2021-04-03 12:16:49 +02:00
|
|
|
str := "Bad space usage for variable indentation.
|
|
|
|
Here it's fine.
|
|
|
|
Here too."
|
|
|
|
str2 := 'linebreak and space\n inside'
|
2021-04-12 15:03:22 +02:00
|
|
|
// String interpolation
|
|
|
|
si1 := 'Error here $foo
|
|
|
|
and not here'
|
2021-04-02 16:26:53 +02:00
|
|
|
}
|