From 80ff2f942ce32ee3635de6ea8b1e0b481196ef2b Mon Sep 17 00:00:00 2001 From: Paul Huf Date: Sun, 12 Jul 2026 07:14:00 -0400 Subject: [PATCH] Make parser fields readonly for SQL CLR SAFE compliance --- src/Sprache/Parse.Primitives.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Sprache/Parse.Primitives.cs b/src/Sprache/Parse.Primitives.cs index 0b7b631..fb7e5fe 100644 --- a/src/Sprache/Parse.Primitives.cs +++ b/src/Sprache/Parse.Primitives.cs @@ -5,7 +5,7 @@ partial class Parse /// /// \n or \r\n /// - public static Parser LineEnd = + public static readonly Parser LineEnd = (from r in Char('\r').Optional() from n in Char('\n') select r.IsDefined ? r.Get().ToString() + n : n.ToString()) @@ -14,7 +14,7 @@ from n in Char('\n') /// /// line ending or end of input /// - public static Parser LineTerminator = + public static readonly Parser LineTerminator = Return("").End() .Or(LineEnd.End()) .Or(LineEnd)