Skip to content

Instantly share code, notes, and snippets.

@thomasio101
Created October 26, 2019 11:31
Show Gist options
  • Save thomasio101/41ac125141cb3865303b87320cdb8f44 to your computer and use it in GitHub Desktop.
Save thomasio101/41ac125141cb3865303b87320cdb8f44 to your computer and use it in GitHub Desktop.
┌─────────────────┐
│ statement group │
└────────┬────────┘
┌─────────────────────────────────┴─────────────────────────────────┐
first second
┌─────┴──────┐ ┌────────┴────────┐
│ assignment │ │ statement group │
└─────┬──────┘ └────────┬────────┘
┌─────────┴──────────┐ ┌─────────────────────────────────────┴─────────────────────────────────────┐
left-hand right-hand first second
┌──────┴───────┐ ┌─────────┴─────────┐ ┌─────┴──────┐ ┌──┴───┐
│ variable "a" │ │ integer literal 1 │ │ assignment │ │ call │
└──────────────┘ └───────────────────┘ └─────┬──────┘ └──┬───┘
┌────────┴────────┐ ┌───────┴────────┐
left-hand right-hand function arguments
┌──────┴───────┐ ┌──────┴──────┐ ┌────────┴─────────┐ ┌───┴───┐
│ variable "b" │ │ conditional │ │ variable "print" │ │ tuple │
└──────────────┘ └──────┬──────┘ └──────────────────┘ └───┬───┘
┌───────────────────────────────┬────────┴─────────────────────────────────────────┐ │
condition true false first
┌────┴─────┐ ┌──────────────────────┴───────────────────────┐ ┌───────────────────────┴───────────────────────┐ ┌──────┴───────┐
│ equality │ │ string literal "Variable "a" is equal to 1." │ │ string literal "Variable "a" is not equal 1." │ │ variable "b" │
└────┬─────┘ └──────────────────────────────────────────────┘ └───────────────────────────────────────────────┘ └──────────────┘
┌─────────┴──────────┐
left-hand right-hand
┌──────┴───────┐ ┌─────────┴─────────┐
│ variable "a" │ │ integer literal 1 │
└──────────────┘ └───────────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment