This commit is contained in:
Roberto Alsina 2023-07-12 20:37:55 -03:00
parent 29d1e7ab2e
commit b910e00a47
2 changed files with 5 additions and 8 deletions

View File

@ -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;

View File

@ -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;
// };