22 references to Literal
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SyntaxFactory.cs (1)
382
return
Literal
(ObjectDisplay.FormatLiteral(value, ObjectDisplayOptions.None), value);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (2)
133
LiteralExpression(SyntaxKind.NumericLiteralExpression,
Literal
(numericLiteral.Token.Text, 1)),
134
LiteralExpression(SyntaxKind.NumericLiteralExpression,
Literal
(shiftValue.ToString(), shiftValue)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (4)
82
sbyte val => GenerateLiteralExpression(type, val, LiteralSpecialValues.SByteSpecialValues, formatString: null, canUseFieldReference, (s, v) =>
Literal
(s, v), x => x < 0, x => (sbyte)-x, "128"),
83
short val => GenerateLiteralExpression(type, val, LiteralSpecialValues.Int16SpecialValues, formatString: null, canUseFieldReference, (s, v) =>
Literal
(s, v), x => x < 0, x => (short)-x, "32768"),
84
int val => GenerateLiteralExpression(type, val, LiteralSpecialValues.Int32SpecialValues, formatString: null, canUseFieldReference,
Literal
, x => x < 0, x => -x, "2147483648"),
86
byte val => GenerateNonNegativeLiteralExpression(type, val, LiteralSpecialValues.ByteSpecialValues, formatString: null, canUseFieldReference, (s, v) =>
Literal
(s, v)),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
289
SyntaxKind.NumericLiteralExpression, SyntaxFactory.
Literal
("0", 0));
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (2)
133
LiteralExpression(SyntaxKind.NumericLiteralExpression,
Literal
(numericLiteral.Token.Text, 1)),
134
LiteralExpression(SyntaxKind.NumericLiteralExpression,
Literal
(shiftValue.ToString(), shiftValue)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (4)
82
sbyte val => GenerateLiteralExpression(type, val, LiteralSpecialValues.SByteSpecialValues, formatString: null, canUseFieldReference, (s, v) =>
Literal
(s, v), x => x < 0, x => (sbyte)-x, "128"),
83
short val => GenerateLiteralExpression(type, val, LiteralSpecialValues.Int16SpecialValues, formatString: null, canUseFieldReference, (s, v) =>
Literal
(s, v), x => x < 0, x => (short)-x, "32768"),
84
int val => GenerateLiteralExpression(type, val, LiteralSpecialValues.Int32SpecialValues, formatString: null, canUseFieldReference,
Literal
, x => x < 0, x => -x, "2147483648"),
86
byte val => GenerateNonNegativeLiteralExpression(type, val, LiteralSpecialValues.ByteSpecialValues, formatString: null, canUseFieldReference, (s, v) =>
Literal
(s, v)),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
289
SyntaxKind.NumericLiteralExpression, SyntaxFactory.
Literal
("0", 0));
Roslyn.Diagnostics.CSharp.Analyzers (7)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (2)
133
LiteralExpression(SyntaxKind.NumericLiteralExpression,
Literal
(numericLiteral.Token.Text, 1)),
134
LiteralExpression(SyntaxKind.NumericLiteralExpression,
Literal
(shiftValue.ToString(), shiftValue)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (4)
82
sbyte val => GenerateLiteralExpression(type, val, LiteralSpecialValues.SByteSpecialValues, formatString: null, canUseFieldReference, (s, v) =>
Literal
(s, v), x => x < 0, x => (sbyte)-x, "128"),
83
short val => GenerateLiteralExpression(type, val, LiteralSpecialValues.Int16SpecialValues, formatString: null, canUseFieldReference, (s, v) =>
Literal
(s, v), x => x < 0, x => (short)-x, "32768"),
84
int val => GenerateLiteralExpression(type, val, LiteralSpecialValues.Int32SpecialValues, formatString: null, canUseFieldReference,
Literal
, x => x < 0, x => -x, "2147483648"),
86
byte val => GenerateNonNegativeLiteralExpression(type, val, LiteralSpecialValues.ByteSpecialValues, formatString: null, canUseFieldReference, (s, v) =>
Literal
(s, v)),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
289
SyntaxKind.NumericLiteralExpression, SyntaxFactory.
Literal
("0", 0));