Fix indentation of HLSL source expression
このコミットが含まれているのは:
1 親
e69f083b29
コミット
0780345ef9
3ファイル変更
+9
-9
検索条件に一致するファイルはありません
@@ -17,13 +17,11 @@ internal static class SyntaxTokenHelper
|
||||
/// <returns>A <see cref="SyntaxToken"/> representing a raw multiline string literal with the value of <paramref name="text"/>.</returns>
|
||||
public static SyntaxToken CreateRawMultilineStringLiteral(string text, int indentationLevel)
|
||||
{
|
||||
// Create a token to represent the raw multiline string literal expression. Here some spaces are
|
||||
// also added to properly align the resulting text with one indentation below the declaring string constant.
|
||||
// The spaces are: 4 for each containing type, 4 for the containing method, and 4 for the one additional indentation.
|
||||
// An extra newline and indentation has to be added to the raw text when there is no trailing newline, as not doing
|
||||
// so would otherwise case the terminating """ token to fall on the same line, which is invalid syntax. This is only
|
||||
// needed to make the code valid, as the actual literal context of the string is not affected and remains the same.
|
||||
string indentation = new(' ', (4 * indentationLevel) + 4 + 4);
|
||||
// Create a token to represent the raw multiline string literal expression. An extra newline and indentation
|
||||
// has to be added to the raw text when there is no trailing newline, as not doing so would otherwise case
|
||||
// the terminating """ token to fall on the same line, which is invalid syntax. This is only needed to make
|
||||
// the code valid, as the actual literal context of the string is not affected and remains the same.
|
||||
string indentation = new(' ', 4 * indentationLevel);
|
||||
|
||||
return Token(
|
||||
TriviaList(),
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする