Skip to content

Instantly share code, notes, and snippets.

@wkz
Created October 21, 2017 22:13
Show Gist options
  • Save wkz/4bb4697bec4e389d7dc1b678d07d6a54 to your computer and use it in GitHub Desktop.
Save wkz/4bb4697bec4e389d7dc1b678d07d6a54 to your computer and use it in GitHub Desktop.
/* {
* @t[0] = time();
* @reads[pid()] = quantize(arg2)
* }
*/
prog->ast =
node_expr("",
node_expr("=",
node_expr("[]",
node_ident("@t"),
node_num(0),
NULL),
node_expr("time", NULL),
NULL),
node_expr("=",
node_expr("[]",
node_ident("@reads"),
node_expr("pid", NULL),
NULL),
node_expr("quantize", node_ident("arg2"), NULL),
NULL),
NULL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment