diff --git a/shortcodes.h b/shortcodes.h index 72fa89f..ddb37ec 100644 --- a/shortcodes.h +++ b/shortcodes.h @@ -1,12 +1,16 @@ #ifndef SHORTCODES_H #define SHORTCODES_H + +// A chunk is a reference to a piece of string +// from "start" relative to its start +// and goes on for len characters. struct chunk { int start, len; }; - typedef struct chunk chunk; +// Describes a parsed shortcode struct shortcode { chunk whole; diff --git a/shortcodes.rl b/shortcodes.rl index a11ba58..0270940 100644 --- a/shortcodes.rl +++ b/shortcodes.rl @@ -129,10 +129,3 @@ shortcode *parse(char *input) { return sc_list; } - -// int main(int argc, char **argv) { -// parse( -// "bbb{{% sarasa sar1 sar2 \"sar3\" %}}ccc" -// "{{< c1 arg2 >}}foobar{{% /c1%}}aaa{{% sarasa name=\"pepe\" %}}"); -// return 0; -// };