Skip to content

Instantly share code, notes, and snippets.

@pmurias
Created January 11, 2019 10:28
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 pmurias/292b3ac5b672d9e690d823aca1ecc767 to your computer and use it in GitHub Desktop.
Save pmurias/292b3ac5b672d9e690d823aca1ecc767 to your computer and use it in GitHub Desktop.
Ruby style dsls and ast tree correspondence.
Q::Block.new(Q::Statement::Expr.new(Q::Postfix::Call.new(
Q::Identifier.new("say"),
Q::Literal::Str.new("OH HAI")
)));
block {
expr {
call {
identifier "say";
str "OH HAI";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment