Skip to content

Commit 45d3d38

Browse files
committed
Rust: test cases for comments
1 parent ef3f730 commit 45d3d38

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
| comments.rs:1:1:3:2 | Comment | getParent: | comments.rs:1:1:9:1 | foo | getText: | /** \n* A doc comment\n*/ |
2+
| comments.rs:6:17:6:34 | Comment | getParent: | comments.rs:6:17:8:16 | nested | getText: | // print some text |
3+
| comments.rs:7:3:7:31 | Comment | getParent: | comments.rs:6:17:8:16 | nested | getText: | /// This is a nested function |
4+
| gen_comment.rs:1:1:1:36 | Comment | getParent: | gen_comment.rs:1:1:7:2 | SourceFile | getText: | // generated by codegen, do not edit |
5+
| gen_comment.rs:4:5:4:30 | Comment | getParent: | gen_comment.rs:3:25:7:1 | StmtList | getText: | // A comment. For example: |
6+
| gen_comment.rs:5:5:5:24 | Comment | getParent: | gen_comment.rs:3:25:7:1 | StmtList | getText: | // this is a comment |
7+
| gen_comment.rs:6:5:6:29 | Comment | getParent: | gen_comment.rs:3:25:7:1 | StmtList | getText: | /// This is a doc comment |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* A doc comment
3+
*/
4+
5+
fn foo() {
6+
print("foo"); // print some text
7+
/// This is a nested function
8+
fn nested() {}
9+
}
10+

0 commit comments

Comments
 (0)