Rust: test cases for comments

This commit is contained in:
Arthur Baars
2024-09-30 14:58:32 +02:00
parent ef3f730d32
commit 45d3d381f5
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
| comments.rs:1:1:3:2 | Comment | getParent: | comments.rs:1:1:9:1 | foo | getText: | /** \n* A doc comment\n*/ |
| comments.rs:6:17:6:34 | Comment | getParent: | comments.rs:6:17:8:16 | nested | getText: | // print some text |
| comments.rs:7:3:7:31 | Comment | getParent: | comments.rs:6:17:8:16 | nested | getText: | /// This is a nested function |
| gen_comment.rs:1:1:1:36 | Comment | getParent: | gen_comment.rs:1:1:7:2 | SourceFile | getText: | // generated by codegen, do not edit |
| gen_comment.rs:4:5:4:30 | Comment | getParent: | gen_comment.rs:3:25:7:1 | StmtList | getText: | // A comment. For example: |
| gen_comment.rs:5:5:5:24 | Comment | getParent: | gen_comment.rs:3:25:7:1 | StmtList | getText: | // this is a comment |
| gen_comment.rs:6:5:6:29 | Comment | getParent: | gen_comment.rs:3:25:7:1 | StmtList | getText: | /// This is a doc comment |

View File

@@ -0,0 +1,10 @@
/**
* A doc comment
*/
fn foo() {
print("foo"); // print some text
/// This is a nested function
fn nested() {}
}