Skip to content

Instantly share code, notes, and snippets.

@dmajda
Created April 8, 2013 04:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmajda/5334315 to your computer and use it in GitHub Desktop.
Save dmajda/5334315 to your computer and use it in GitHub Desktop.
Call
= id:ID params:Params+ {
var result = {
type: "var",
name: id
};
for (var i = 0; i < params.length; i++) {
result = {
type: "call",
expr: result,
params: params[i]
};
}
return result;
}
Params
= "(" id:ID ")" { return id; }
ID
= [a-z]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment