Coder Social home page Coder Social logo

manger's People

Watchers

 avatar

manger's Issues

Trimmed types

It would really awesome to add a Trim<T> type which removes any surrounding Whitespace. This could also come with TrimLeft<T> and TrimRight<T> which would only trim on the left or the right side, respectively.

These types should be in the manger::common module most probably.

Consuming arbitrary data should be easier.

There should something to consume arbitrary, such as encased strings.

The preferred syntax for this should be something like this, but maybe there is a better syntax for this:

use manger::consume_struct;

struct UntilClosingParenthese(String);
consume_struct!(UntilClosingParenthese => [ value: &str { @until ')' }; (value) ]);

Interloped types should be a thing.

Right now, interloping Whitespace or OneOrMore<Whitespace> everywhere is kind of bloating a lot of code. It would be nicer if we had something like this:

use manger::consume_struct;

struct Sum(i32);
consume_struct!(
  Sum => (@i[OneOrMore<Whitespace>])[
    left: i32,
    > '+',
    right: i32;
    (left + right)
  ]
);

Errors are very messy at the moment

The ConsumeError now has a couple of problems.

First of all, there is always a heap allocation necessary when any occurs anywhere even if it isn't actually gonna cause the consume to fail. This stifles performance.

Secondly, errors are hard to grasp. There are a lot of errors returned when enums or Either is used. Which makes it very difficult. This makes errors also really difficult to track down.

I would hope a solution to this problem solves both these problems. This would probably also reduces some bloat in the code.

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.