Christian Grasser a61b03ea88 Update Scintilla from v4.4.6 to v5.2.1 and add Lexilla v5.1.5
Update with https://www.scintilla.org/scintilla521.zip
            https://www.scintilla.org/lexilla515.zip

- fix setting to bring Scintilla::PositionCR from ScintillaStructures.h inline with Sci_Position.h Sci_PositionCR
- add workaround to enable lexer for searchResult
commented out SCI_SETILEXER call on searchResult to get one result which is correctly handled by the lexer,
added comment about the current problem with property @MarkingsStruct which seems to disappear after call to SCI_SETILEXER or CreateLexer
- corrected usage of ObjC lexer
- removed unnecessary filter stuff
- use own sections for scintilla and lexilla build targets and allow parallel builds
- as libscilex is no longer existing, changed to libscintilla
- adapt makefiles and cmake
- use VS2019
- started simple changes for createlexer adaptations, nullpointercheck missing on return of lexer name from deprecated LexerNameFromID -> undefined behaviour
- movement from id -> lexer name, mostly done via LexerNameFromID + switching off corresponding compiler warning
- changed to SCI_SETILEXER from SCI_SETLEXER, SCI_SETLEXERLANGUAGE needs to be corrected, see Scintilla5Migration.html
- just commented out: SCI_LOADLEXERLIBRARY

Fix #10504, close #11419
2022-03-27 17:12:53 +02:00

54 lines
1.5 KiB
Forth

// x.fs
// Sample source file to test F# syntax highlighting
[<AutoOpen>]
module Example
#line 7 "A compiler directive"
#if DEBUG
open System
open System.IO
open System.Diagnostics
#endif
# 14 @"See: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings#remarks"
// verbatim string
let xmlFragment1 = @"<book href=""https://www.worldcat.org/title/paradise-lost/oclc/1083714070"" title=""Paradise Lost"">"
// triple-quoted string
let xmlFragment2 = """<book href="https://www.worldcat.org/title/paradise-lost/oclc/1083714070" title="Paradise Lost">"""
(* you need .NET 5.0 to compile this:
https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-50#string-interpolation
*)
let interpolated = $"""C:\{System.DateTime.Now.ToString("yyyy-MM-dd")}\""" + $"{System.Random().Next(System.Int32.MaxValue)}.log"
let ``a byte literal`` = '\209'B
// quoted expression
let expr =
<@@
let foo () = "bar"
foo ()
@@>
let bigNum (unused: 'a): float option =
Seq.init 10_000 (float >> (fun i -> i + 11.))
|> (List.ofSeq
>> List.take 5
>> List.fold (*) 1.0)
|> Some
match bigNum () with
| Some num -> sprintf "%.2f > %u" num ``a byte literal``
| None -> sprintf "%A" "Have a byte string!"B
|> printfn "%s"
// GitHub Issue #38
let unescapeWinPath (path: string) =
path.Replace("\\\\", "\\").Replace("\"", "")
unescapeWinPath "\\\"Program Files (x86)\\Windows NT\\Accessories\\\""
|> System.IO.Directory.GetFiles
|> printfn "%A"