Git Product home page Git Product logo

Comments (8)

vzarytovskii avatar vzarytovskii commented on June 6, 2024

@nojaf fyi, might be interesting for you

from fslang-design.

nojaf avatar nojaf commented on June 6, 2024

If the lexer/parser can capture this in the syntax tree, Fantomas can restore it.

from fslang-design.

dsyme avatar dsyme commented on June 6, 2024

This can be captured, yes, we should treat this as an FCS/ fantomas bug

from fslang-design.

mataha avatar mataha commented on June 6, 2024

What's the next step then? Do I file a bug report in Fantomas, then try to fix it before v5 hits?

from fslang-design.

nojaf avatar nojaf commented on June 6, 2024

The next step would be to raise a PR to dotnet/fsharp that adds the shebang as ParsedHashDirective (I think).

You can open an issue in Fantomas, but you would get the same reply there.
This doesn't hinder the v5 release, we would accept a fix at any time for this.

from fslang-design.

nojaf avatar nojaf commented on June 6, 2024

Actually, after taking another look at this, it can be solved quite easily on Fantomas' side without any compiler changes.

Looking at the AST, the shebang is parsed as a line comment. There is a bug in Fantomas that doesn't recognize this as a line comment on a single line because it does not start with //.

@mataha, please report an issue on Fantomas' side. You can do this using the online tool.

from fslang-design.

nojaf avatar nojaf commented on June 6, 2024

@dsyme this was implemented in Fantomas a while ago, do we still need to do anything here?

from fslang-design.

cartermp avatar cartermp commented on June 6, 2024

This can be closed as completed.

from fslang-design.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.