Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/units/Goccia.Error.Suggestions.pas
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ interface
SSuggestCloseBlockComment = 'Add "*/" to close the block comment';
SSuggestCloseString = 'Add a closing quote to end the string';
SSuggestCloseTemplate = 'Add a closing backtick to end the template literal';
SSuggestCloseRegex = 'Add a closing / to end the regex, followed by optional flags (g, i, m, s, u, y)';
SSuggestValidRegexFlags = 'Valid regex flags are: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), y (sticky)';
SSuggestCloseRegex = 'Add a closing / to end the regex, followed by optional flags (d, g, i, m, s, u, v, y)';
SSuggestValidRegexFlags = 'Valid regex flags are: d (hasIndices), g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), v (unicodeSets), y (sticky)';
SSuggestDuplicateRegexFlag = 'Each regex flag can only appear once';
SSuggestRegexSuffixFlags = 'Only flag characters (g, i, m, s, u, y) are allowed after the closing /';
SSuggestRegexSuffixFlags = 'Only flag characters (d, g, i, m, s, u, v, y) are allowed after the closing /';

// Lexer errors — numbers
SSuggestHexNumberFormat = 'Hex numbers start with 0x followed by hex digits (e.g., 0xFF)';
Expand Down
2 changes: 1 addition & 1 deletion source/units/Goccia.Lexer.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ procedure TGocciaLexer.ScanRegexLiteral;

for I := 1 to Length(Flags) do
begin
if not CharInSet(Flags[I], ['g', 'i', 'm', 's', 'u', 'y']) then
if not CharInSet(Flags[I], ['d', 'g', 'i', 'm', 's', 'u', 'v', 'y']) then
raise TGocciaLexerError.Create('Invalid regular expression flag: ' + Flags[I],
FLine, FColumn, FFileName, GetSourceLines,
SSuggestValidRegexFlags);
Expand Down
Loading
Loading