From 6983a9dd6669cd2ca2f03a639b94cc541051c9d9 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Tue, 30 Jan 2024 17:22:50 +0100 Subject: [PATCH 1/3] PrettyNaming: make DoesIdentifierNeedBackticks public --- src/Compiler/SyntaxTree/PrettyNaming.fsi | 2 +- .../FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Compiler/SyntaxTree/PrettyNaming.fsi b/src/Compiler/SyntaxTree/PrettyNaming.fsi index 05478070e1a..511f60b9057 100644 --- a/src/Compiler/SyntaxTree/PrettyNaming.fsi +++ b/src/Compiler/SyntaxTree/PrettyNaming.fsi @@ -58,7 +58,7 @@ val IsIdentifierName: name: string -> bool /// TBD: needs unit testing val IsActivePatternName: name: string -> bool -val internal DoesIdentifierNeedBackticks: string -> bool +val DoesIdentifierNeedBackticks: string -> bool /// Adds double backticks if necessary to make a valid identifier, e.g. /// op_Addition --> op_Addition diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index b7484492a42..df763ee7e20 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -5987,6 +5987,7 @@ FSharp.Compiler.Syntax.ParserDetail: Int32 GetHashCode(System.Collections.IEqual FSharp.Compiler.Syntax.ParserDetail: Int32 Tag FSharp.Compiler.Syntax.ParserDetail: Int32 get_Tag() FSharp.Compiler.Syntax.ParserDetail: System.String ToString() +FSharp.Compiler.Syntax.PrettyNaming: Boolean DoesIdentifierNeedBackticks(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsActivePatternName(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsCompilerGeneratedName(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsIdentifierFirstCharacter(Char) From a1f8e05c5070f7961784cdc7c0b168f063c704b8 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Thu, 1 Feb 2024 13:22:44 +0100 Subject: [PATCH 2/3] More surface area --- ...FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index b7484492a42..df763ee7e20 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -5987,6 +5987,7 @@ FSharp.Compiler.Syntax.ParserDetail: Int32 GetHashCode(System.Collections.IEqual FSharp.Compiler.Syntax.ParserDetail: Int32 Tag FSharp.Compiler.Syntax.ParserDetail: Int32 get_Tag() FSharp.Compiler.Syntax.ParserDetail: System.String ToString() +FSharp.Compiler.Syntax.PrettyNaming: Boolean DoesIdentifierNeedBackticks(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsActivePatternName(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsCompilerGeneratedName(System.String) FSharp.Compiler.Syntax.PrettyNaming: Boolean IsIdentifierFirstCharacter(Char) From 37b331d8e8b85be099fc8d1ce254b18bde2332bc Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Thu, 1 Feb 2024 14:18:05 +0100 Subject: [PATCH 3/3] Release notes --- docs/release-notes/.FSharp.Compiler.Service/8.0.300.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md index 85735d5b430..3051b003b42 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/8.0.300.md @@ -13,6 +13,7 @@ * Parser recovers on complex primary constructor patterns, better tree representation for primary constructor patterns. ([PR #16425](https://github.com/dotnet/fsharp/pull/16425)) * Name resolution: keep type vars in subsequent checks ([PR #16456](https://github.com/dotnet/fsharp/pull/16456)) * Higher-order-function-based API for working with the untyped abstract syntax tree. ([PR #16462](https://github.com/dotnet/fsharp/pull/16462)) +* PrettyNaming: make DoesIdentifierNeedBackticks public ([PR #16613](https://github.com/dotnet/fsharp/pull/16613)) ### Changed