Giter Site home page Giter Site logo

Comments (5)

gravejester avatar gravejester commented on July 4, 2024 1

Ok, I guess we have come to a consensus for letting the +/- before a digit be highlighted as part of that digit. I have already implemented this in my general refactoring of the tmlanguage file.

Thanks for your input!

from editorsyntax.

daviwil avatar daviwil commented on July 4, 2024

@Jaykul @KirkMunro @rkeithhill - Any input here? My personal preference would be to make it part of the number if it's easy to do so in the grammar.

from editorsyntax.

rkeithhill avatar rkeithhill commented on July 4, 2024

PSReadLine colorizes +/- differently depending on whether it is part of a ConstantExpressionAst e.g. +5 or is part of a BinaryExpressionAst 1+5. But PSReadLine has access to the AST. Here, we are just talking about regex's right?

For instance, -$true and +"0xabc" are of type UnaryExpressionAst. I'd colorize that like +/- in a BinaryExpression.

This would be so much easier with help from the AST. :-) That said, I'd say go for it. I think you can whip a regex to distinguish between constants and other expression types and if it colorizes wrong on occasion - big deal.

from editorsyntax.

gravejester avatar gravejester commented on July 4, 2024

Yeah, this would have been so much easier with access to the AST, but there is always a way :)

I guess we have two votes for +- before digits as part of the number. I'll wait a bit before implementing anything so that others can chime in as well.

from editorsyntax.

KirkMunro avatar KirkMunro commented on July 4, 2024

Both PSReadLine and ISE change the coloring if the +/- is attached to the constant expression. I vote to follow that lead.

from editorsyntax.

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.