Skip to content

Commit

Permalink
2023.3.0-eap2
Browse files Browse the repository at this point in the history
  • Loading branch information
controlflow committed Oct 5, 2023
1 parent 0a43548 commit 53cd720
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
16 changes: 10 additions & 6 deletions src/Annotations.cs
Expand Up @@ -788,20 +788,24 @@ public sealed class SourceTemplateAttribute : Attribute
{
/// <summary>
/// Allows specifying which expression to capture for template execution if more than one present on the expansion.
/// If not specified, Inner is assumed.
/// If not specified, <see cref="SourceTemplateTargetExpression.Inner"/> is assumed.
/// </summary>
public SourceTemplateTargetExpression Target { get; set; }
}

/// <summary>
/// Provides a value for the <see cref="SourceTemplateAttribute"/> to define how to capture
/// the expression at the point of expansion
/// </summary>
public enum SourceTemplateTargetExpression
{
/// <summary>Selects inner expression</summary>
/// <example><c>value > 42.{caret}</c> captures <c>42</c></example>
/// <example><c>_args = args.{caret}</c> captures <c>args</c></example>
Inner = 0,

/// <summary>Selects outer expression</summary>
/// <example><c>value > 42.{caret}</c> captures <c>value > 42</c></example>
/// <example><c>_args = args.{caret}</c> captures whole assignment</example>
Outer = 1
}
Expand Down Expand Up @@ -1012,11 +1016,11 @@ public sealed class RegexPatternAttribute : Attribute { }
/// </summary>
public enum InjectedLanguage
{
CSS,
HTML,
JAVASCRIPT,
JSON,
XML
CSS = 0,
HTML = 1,
JAVASCRIPT = 2,
JSON = 3,
XML = 4
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/JetBrains.Annotations.csproj
Expand Up @@ -6,7 +6,7 @@
MAJOR and MINOR version numbers should match latest ReSharper version (to avoid confusion),
PATCH version may vary during development and EAPs -->
<VersionPrefix>2023.3.0</VersionPrefix>
<VersionSuffix>eap1</VersionSuffix>
<VersionSuffix>eap2</VersionSuffix>

<!-- versioning -->
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
Expand Down
1 change: 1 addition & 0 deletions src/JetBrains.Annotations.nuspec
Expand Up @@ -19,6 +19,7 @@ All usages of JetBrains.Annotations attributes are erased from metadata by defau
</description>
<releaseNotes>
&#8226; Added MustDisposeResourceAttribute and HandlesResourceDisposalAttribute attributes for resource disposal analysis.
&#8226; Added SourceTemplateAttribute.Target property to provide a way to specify expression source template must be applied to.
</releaseNotes>
<tags>jetbrains resharper rider annotations canbenull notnull</tags>
<dependencies>
Expand Down

0 comments on commit 53cd720

Please sign in to comment.