// Copyright (C) 2025 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 namespace QtVsTools.SyntaxAnalysis { using static CharClass; public abstract partial class RegExpr { /// public static CharClassLiteral CharWord => new() { LiteralChars = @"\w" }; /// public static RegExpr Word => CharWord.Repeat(); /// public static RegExprLiteral WordBoundary => new() { LiteralExpr = @"\b" }; /// public static CharClassLiteral CharDigit => new() { LiteralChars = @"\d" }; /// public static RegExpr Number => CharDigit.Repeat(); /// public static CharClassLiteral CharCr => new() { LiteralChars = @"\r" }; /// public static CharClassLiteral CharLf => new() { LiteralChars = @"\n" }; /// public static CharClassLiteral CharSpace => new() { LiteralChars = @"\s" }; /// private static CharClassLiteral CharNonSpace => new() { LiteralChars = @"\S" }; /// public static CharClassSet CharVertSpace => CharSet[CharCr + CharLf]; /// public static CharClassSet CharHorizSpace => CharSet[~(CharNonSpace + CharVertSpace)]; /// public static RegExprLiteral AnyChar => new() { LiteralExpr = "." }; /// public static RegExprLiteral StartOfLine => new() { LiteralExpr = "^" }; /// public static RegExprLiteral EndOfLine => new() { LiteralExpr = "$" }; /// public static RegExprLiteral StartOfFile => new() { LiteralExpr = @"\A" }; /// public static RegExprLiteral EndOfFile => new() { LiteralExpr = @"\z" }; /// public static RegExprSequence LineBreak => CharCr.Optional() & CharLf; /// public static RegExpr Space => CharSpace.Repeat(); /// public static RegExpr NonSpace => CharNonSpace.Repeat(); /// public static RegExpr VertSpace => CharVertSpace.Repeat(); /// public static RegExpr HorizSpace => CharHorizSpace.Repeat(); /// public static RegExpr Line => CharSet[~CharVertSpace].Repeat(); /// public static RegExprLiteral CaseInsensitive => new() { LiteralExpr = @"(?i)" }; /// public static RegExprLiteral CaseSensitive => new() { LiteralExpr = @"(?-i)" }; /// /// Applies the same whitespace skipping rules as tokens, but does not capture any text. /// public static RegExpr SkipWs => new Token(); public static CharExprBuilder Char { get; } = new(); public static CharExprBuilder Chars => Char; public static CharSetExprBuilder CharSet { get; } = new(); public static CharSetRawExprBuilder CharSetRaw { get; } = new(); public static AssertExprBuilder LookAhead { get; } = new(AssertLookAhead); public static AssertExprBuilder LookBehind { get; } = new(AssertLookBehind); public const SkipWhitespace SkipWs_Disable = SkipWhitespace.Disable; } }