coastalwhite / manger Goto Github PK
View Code? Open in Web Editor NEWReally fast and easy combinatoric parser for Rust
License: MIT License
Really fast and easy combinatoric parser for Rust
License: MIT License
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.
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) ]);
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)
]
);
The macros consume_struct
and consume_enum
should be turned into procedural macro's.
This will allow for more features later on and the reuse of code.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.