Giter Club home page Giter Club logo

Comments (3)

zertosh avatar zertosh commented on May 14, 2024

The syntax matching has no sense of order of operation - It's all dumb regexs. Operators like arithmetic, ? or :, get matched individually. Sublime's regex can't match across lines. It's a terrible limitation - just look through the issues. To compensate, there are a lot of heuristics to accommodate for the most common use case. What you're seeing is this. Notice that to match an object key there is no concept of being in an object or anything. It's all just trickery in the other in which the regexs run.

I'm afraid this is a "Can't fix".

from babel-sublime.

bathos avatar bathos commented on May 14, 2024

Understood! Honestly I'm amazed by the regex wizardry tmTheme requires and it's not surprising that it has limits like this. Actually it left me wondering why the standard for this stuff is based on pattern matching instead of actual tokenization, which seems like it must be more efficient, but a standard is a standard.

from babel-sublime.

zertosh avatar zertosh commented on May 14, 2024

Sublime just released (this week) a new syntax format. I haven't had a chance to dig into it yet, but it looks promising.

from babel-sublime.

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.