Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -0,0 +1,2 @@
#this is a comment
!print "this is not a comment, obviously" #this is a comment as well

View file

@ -0,0 +1,4 @@
// Single line comment, of course!
/*
Multi line comment!
*/

View file

@ -0,0 +1,14 @@
# Nimrod supports only single-line comments
var x = 0 ## Documentation comments start with double hash characters.
var y = 0 ## Comments are a proper part of the syntax and are indentation sensitive.
## If the next line only consists of a comment piece, it must be aligned
## either to the preceding one (documentation generator would merge these lines)
## or to the code block (starting a new comment piece).
# any misaligned comment line (like this one) would trigger an "invalid indentation" error
var z = 0 ## Alternatively you can end the preceding comment piece with a backslash \
## to reset alignment to any column you like.
## See also http://nimrod-code.org/tut1.html#comments

View file

@ -0,0 +1,39 @@
// A single line comment
/*
This is a multi-line (aka block) comment
/*
containing nested multi-line comment
(nesting supported since 0.9-pre https://github.com/mozilla/rust/issues/9468)
*/
*/
/// Outer single line Rustdoc comments apply to the next item.
/**
Outer multi-line Rustdoc comments.
* Leading asterisk (*) in multi-line Rustdoc comments
* is not considered to be part of the comment text,
* blanks and tabs preceding the initial asterisk (*) are also stripped.
*/
fn example() {
//! Inner single line Rustdoc comments apply to their enclosing item.
/*!
Inner multi-line Rustdoc comments.
See also https://github.com/mozilla/rust/wiki/Doc-using-rustdoc
*/
}
#[doc = "Unsugared outer Rustdoc comments.
(outer attributes are not terminated by a semi-colon)"]
fn example() {
#[doc = "Unsugared inner Rustdoc comments.
(inner attributes are terminated by a semi-colon)
See also https://github.com/mozilla/rust/blob/master/doc/rust.md#attributes"];
}