handycandy 1.0.1
A reimagined version of the Handy Array parser.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
HandyCandy
A rewrite of the Handy Array Parser.
import handycandy;
import std.stdio;
void mycallback(string str)
{
writeln(str);
}
void main()
{
auto ms = handy_newstate();
/* You can change things before and after you parse, if you allow callbacks,
you need to create a callback function or else you'll get SEGFAULT. */
handy_set_callback(ms, &mycallback);
handy_allow_callback(ms);
handy_add_excl_char(ms, '\'', handy_charstate.stringlike);
/* when you exclude a character, you're basically telling the
parser to either treat it as a string (open and close), or ignore it fully. */
handy_parse_result(ms, "['1,', 2,3]");
writeln(ms.result);
}
- 1.0.1 released 2 years ago
- thekaigonzalez/handycandy
- MIT
- Copyright © 2022, Kai Gonzalez
- Authors:
- Dependencies:
- none
- Versions:
-
1.0.1 2022-Apr-28 1.0.0 2022-Apr-28 ~master 2022-Apr-28 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
6 downloads total
-
- Score:
- 0.3
- Short URL:
- handycandy.dub.pm