Skip to content

Instantly share code, notes, and snippets.

@joepie91
Created July 4, 2017 15:54
Show Gist options
  • Save joepie91/a726e66cd20abe0827848e324229c155 to your computer and use it in GitHub Desktop.
Save joepie91/a726e66cd20abe0827848e324229c155 to your computer and use it in GitHub Desktop.
{ f = x: x; a=1; b=2; list = [ a f b ]; }
{ type: 'set',
assignments:
[ { type: 'assignment',
identifier: { type: 'identifier', identifier: 'f' },
expression:
{ type: 'functionDefinition',
argument: { type: 'identifier', identifier: 'x' },
body: { type: 'identifier', identifier: 'x' } } },
{ type: 'assignment',
identifier: { type: 'identifier', identifier: 'a' },
expression: { type: 'numberLiteral', value: '1' } },
{ type: 'assignment',
identifier: { type: 'identifier', identifier: 'b' },
expression: { type: 'numberLiteral', value: '2' } },
{ type: 'assignment',
identifier: { type: 'identifier', identifier: 'list' },
expression:
{ type: 'list',
items:
[ { type: 'identifier', identifier: 'a' },
{ type: 'identifier', identifier: 'f' },
{ type: 'identifier', identifier: 'b' } ] } } ] }
----
{
f = x: x;
a = 1;
b = 2;
list = [ a f b ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment