mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-08-26 12:18:31 +02:00
Release 5.5.3 (https://www.scintilla.org/scintilla553.zip) Released 19 October 2024. On Win32 change direction of horizontal mouse wheel and touchpad scrolling to match other applications. Bug #2449. Release 5.4.1 (https://www.scintilla.org/lexilla541.zip) Released 19 October 2024. Lexer added for Dart "dart". Pull request #265, Pull request #275. Lexer added for troff / nroff "troff". Pull request #264. Lexer added for Zig "zig". Pull request #267. C++: Fix crash for empty documentation comment keyword where '<' occurs at line end. F#: Include EOLs in the style range of SCE_FSHARP_COMMENTLINE. Stabilizes EOL detection when folding line comment groups. Issue #276. F#: Fix per-line folding in F# documents. Issue #277. HTML: Improve SGML/DTD lexing. Don't terminate SGML when > inside quoted string. Lex both [ and ] as SCE_H_SGML_DEFAULT. Nested sections handled instead of switching to SCE_H_SGML_ERROR. Issue #272. JavaScript: New SCE_HJ_TEMPLATELITERAL and SCE_HJA_TEMPLATELITERAL styles for template literals when lexer is hypertext, or xml. Issue #280. PHP: Fix failure to recognize PHP start "<?php' at end of document. Caused by not capping retrieval range at document end causing no text to be retrieved. Issue #269. Smalltalk: Fix scaled decimal numbers without decimal separator. Pull request #274. Fix #15228, fix #15368, fix #15650, close #15717
54 lines
2.2 KiB
Plaintext
54 lines
2.2 KiB
Plaintext
2 400 401 + // x.fs
|
|
0 401 400 | // Sample source file to test F# syntax highlighting
|
|
1 400 400
|
|
0 400 400 [<AutoOpen>]
|
|
0 400 400 module Example
|
|
1 400 400
|
|
0 400 400 #line 7 "A compiler directive"
|
|
2 400 401 + #if DEBUG
|
|
2 401 402 + open System
|
|
0 402 402 | open System.IO
|
|
0 402 401 | open System.Diagnostics
|
|
0 401 400 | #endif
|
|
1 400 400
|
|
0 400 400 # 14 @"See: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings#remarks"
|
|
0 400 400 // verbatim string
|
|
0 400 400 let xmlFragment1 = @"<book href=""https://www.worldcat.org/title/paradise-lost/oclc/1083714070"" title=""Paradise Lost"">"
|
|
1 400 400
|
|
0 400 400 // triple-quoted string
|
|
0 400 400 let xmlFragment2 = """<book href="https://www.worldcat.org/title/paradise-lost/oclc/1083714070" title="Paradise Lost">"""
|
|
1 400 400
|
|
2 400 401 + (* you need .NET 5.0 to compile this:
|
|
0 401 401 | https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-50#string-interpolation
|
|
0 401 400 | *)
|
|
0 400 400 let interpolated = $"""C:\{System.DateTime.Now.ToString("yyyy-MM-dd")}\""" + $"{System.Random().Next(System.Int32.MaxValue)}.log"
|
|
1 400 400
|
|
0 400 400 let ``a byte literal`` = '\209'B
|
|
1 400 400
|
|
0 400 400 // quoted expression
|
|
0 400 400 let expr =
|
|
0 400 400 <@@
|
|
0 400 400 let foo () = "bar"
|
|
0 400 400 foo ()
|
|
0 400 400 @@>
|
|
1 400 400
|
|
0 400 400 let bigNum (unused: 'a): float option =
|
|
0 400 400 Seq.init 10_000 (float >> (fun i -> i + 11.))
|
|
0 400 400 |> (List.ofSeq
|
|
0 400 400 >> List.take 5
|
|
0 400 400 >> List.fold (*) 1.0)
|
|
0 400 400 |> Some
|
|
1 400 400
|
|
0 400 400 match bigNum () with
|
|
0 400 400 | Some num -> sprintf "%.2f > %u" num ``a byte literal``
|
|
0 400 400 | None -> sprintf "%A" "Have a byte string!"B
|
|
0 400 400 |> printfn "%s"
|
|
1 400 400
|
|
0 400 400 // GitHub Issue #38
|
|
0 400 400 let unescapeWinPath (path: string) =
|
|
0 400 400 path.Replace("\\\\", "\\").Replace("\"", "")
|
|
1 400 400
|
|
0 400 400 unescapeWinPath "\\\"Program Files (x86)\\Windows NT\\Accessories\\\""
|
|
0 400 400 |> System.IO.Directory.GetFiles
|
|
0 400 400 |> printfn "%A"
|
|
0 400 0 |