feat: add limited support of comments inside js call.

This commit is contained in:
Artem Kobzar
2022-04-07 15:32:03 +02:00
committed by teamcity
parent 6e30ce2763
commit 45e3c94a8b
20 changed files with 890 additions and 20 deletions
+29
View File
@@ -0,0 +1,29 @@
// EXPECTED_REACHABLE_NODES: 1282
// CHECK_COMMENT_EXISTS: text="Single line comment" multiline=false
// CHECK_COMMENT_EXISTS: text="Multi line comment" multiline=true
// CHECK_COMMENT_EXISTS: text="After call single line comment" multiline=false
// CHECK_COMMENT_EXISTS: text="After call multi line comment" multiline=true
// CHECK_COMMENT_DOESNT_EXIST: text="random position comment 1" multiline=true
// CHECK_COMMENT_DOESNT_EXIST: text="random position comment 2" multiline=true
// CHECK_COMMENT_DOESNT_EXIST: text="random position comment 3" multiline=true
package foo
fun box(): String {
js("""
function foo() {}
// Single line comment
foo();
/* Multi line comment */
foo();
foo(); // After call single line comment
foo(); /* After call multi line comment */
var /*random position comment 1*/ c /*random position comment 2*/ = /*random position comment 3*/ "Random position";
""")
return "OK"
}