Code Monkey home page Code Monkey logo

asciimath-parser's People

Contributors

widcardw avatar zmx0142857 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

asciimath-parser's Issues

Improve the structure of the syntax tree

After I have refactored the tests, there are some redundant flat wrappers in the generated syntax tree. Sometimes I even don't know why the flat wrapper exists.

flat(flat(lp('['), u('a'), u(','), u('b'), rp(']'))), // TODO: 这里可以优化一下

flat(flat(u('x'), sup('^', u('2')))), // TODO: 待优化

flat(
flat(
lp('('), u('3'), u('+'), u('4'), rp(')'), // TODO
sup('^', u('7')),
),
),
flat(u('4')),

flat(u('x'), sup('^', u('2'))), // TODO: why?

Although the redundant flats may not change the output of toTex function, it still needs to be improved.

Allow chaining underscores and carets

I know it's kind of not how original ASCIIMath works, but it's quite handy.

What I'm talking about is to allow a_b_c which will be the same as a_(b_c).

Same thing with a^b^c == a^(b^c)

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.