Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
191950d
Add unit tests for interp strings with string expr
abonie Jan 16, 2024
0bb2323
Add IL test for lowering to concat
abonie Jan 16, 2024
6d67b56
Add optimization in CheckExpressions
abonie Jan 16, 2024
1804afe
Do not optimize when format specifiers are there
abonie Jan 30, 2024
12e231e
Adjust expected length of codegen
abonie Jan 30, 2024
7b7b4c7
Filter out empty string parts
abonie Feb 2, 2024
03200ae
Detect format specifiers better
abonie Feb 2, 2024
9d7419d
Refactor, improve regex
abonie Feb 6, 2024
8f3d2b2
Unrelated indentation fix in parser
abonie Feb 6, 2024
af418a3
Use language feature flag
abonie Feb 14, 2024
467e876
FSComp.txt auto-update
abonie Feb 15, 2024
a60c558
Add release notes
abonie Feb 15, 2024
d299d70
Add langversion flag to some unit tests
abonie Feb 16, 2024
b9c3bc4
Merge branch 'main' of https://github.com/abonie/fsharp into str-inte…
abonie Feb 16, 2024
47e390e
Merge branch 'main' into str-interp-to-concat
abonie Feb 16, 2024
f3c42b9
Fix typo in src/Compiler/FSComp.txt
abonie Feb 20, 2024
629812e
Update .xlf and undo change to CheckFormatStrings
abonie Feb 20, 2024
3bcb745
Add a test, undo change in CheckFormatString
abonie Feb 20, 2024
fe5059a
Merge branch 'main' into str-interp-to-concat
abonie Feb 20, 2024
cbb7277
Refactor based on review suggestions
abonie Feb 21, 2024
b4f0bf3
Add more IL tests
abonie Feb 21, 2024
eb62292
Add comments lost in refactoring
abonie Feb 21, 2024
ea6c6ec
Automated command ran: fantomas
github-actions[bot] Feb 22, 2024
22fe9f2
Merge branch 'main' into str-interp-to-concat
psfinaki Feb 22, 2024
1eb4ad4
Merge branch 'main' into str-interp-to-concat
abonie Feb 22, 2024
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
Prev Previous commit
Next Next commit
Add comments lost in refactoring
  • Loading branch information
abonie committed Feb 21, 2024
commit eb62292ed6443cd830caaeb7db6d370268c5f443
2 changes: 2 additions & 0 deletions src/Compiler/Checking/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ let (|HasFormatSpecifier|_|) (s: string) =
if
Regex.IsMatch(
s,
// Regex pattern for something like: %[flags][width][.precision][type]
"""
(^|[^%]) # Start with beginning of string or any char other than '%'
(%%)*% # followed by an odd number of '%' chars
Expand All @@ -165,6 +166,7 @@ let (|HasFormatSpecifier|_|) (s: string) =
else
ValueNone

// Removes trailing "%s" unless it was escaped by another '%' (checks for odd sequence of '%' before final "%s")
let (|WithTrailingStringSpecifierRemoved|) (s: string) =
if s.EndsWith "%s" then
let i = s.AsSpan(0, s.Length - 2).LastIndexOfAnyExcept '%'
Expand Down