We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a10d087 commit ab02f89Copy full SHA for ab02f89
CSharpToJavaScript/Walker.cs
@@ -55,9 +55,20 @@ public override void VisitTrivia(SyntaxTrivia trivia)
55
{
56
switch (trivia.Kind())
57
58
+ case SyntaxKind.SingleLineCommentTrivia:
59
+ {
60
+ string _full = trivia.ToString();
61
+
62
+ //special syntax.
63
+ //for writing js code //...\\
64
+ if (_full.EndsWith(@"\\"))
65
+ JSSB.Append(_full.AsSpan(2, _full.Length - 4));
66
+ else
67
+ JSSB.Append(_full);
68
+ return;
69
+ }
70
case SyntaxKind.MultiLineCommentTrivia:
71
case SyntaxKind.WhitespaceTrivia:
- case SyntaxKind.SingleLineCommentTrivia:
72
73
string _full = trivia.ToFullString();
74
JSSB.Append(_full);
0 commit comments