8000 GDScript3 detected over F# (FSharp) · Issue #1080 · alecthomas/chroma · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

GDScript3 detected over F# (FSharp) #1080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
gandarez opened this issue May 19, 2025 · 0 comments
Open
1 task done

GDScript3 detected over F# (FSharp) #1080

gandarez opened this issue May 19, 2025 · 0 comments
Labels
help wanted lexer bug Highlighting error in a lexer

Comments

@gandarez
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Current Chroma version is detecting this sample file which is a F# demo code as GDScript3.

// ================================================
// More on functions
// ================================================

// F# is a true functional language -- functions are first
// class entities and can be combined easily to make powerful
// constructs

// Modules are used to group functions together
// Indentation is needed for each nested module.
module FunctionExamples =

    // define a simple adding function
    let add x y = x + y

    // basic usage of a function
    let a = add 1 2
    printfn "1 + 2 = %i" a

    // partial application to "bake in" parameters
    let add42 = add 42
    let b = add42 1
    printfn "42 + 1 = %i" b

    // composition to combine functions
    let add1 = add 1
    let add2 = add 2
    let add3 = add1 >> add2
    let c = add3 7
    printfn "3 + 7 = %i" c

    // higher order functions
    [1..10] |> List.map add3 |> printfn "new list is %A"

    // lists of functions, and more
    let add6 = [add1; add2; add3] |> List.reduce (>>)
    let d = add6 7
    printfn "1 + 2 + 3 + 7 = %i" d

To Reproduce

// data is max 512kb
lexers.Analyse(string(data))
@gandarez gandarez added the bug label May 19, 2025
@alecthomas alecthomas added help wanted lexer bug Highlighting error in a lexer and removed bug labels May 19, 2025
@gandarez gandarez changed the title GDscript3 detected over F# (FSharp) GDScript3 detected over F# (FSharp) May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted lexer bug Highlighting error in a lexer
Projects
None yet
Development

No branches or pull requests

2 participants
0