Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| macro $testadd { | |
| case { $$mac $expr } => { | |
| var ident = makeIdent('test', #{ $$mac }); | |
| return withSyntax ($ident = [ident]) { | |
| return #{ | |
| return $expr + $ident; | |
| } | |
| } | |
| } | |
| } |
| macro bf { | |
| case ($body ...) => { | |
| eval('var p = 0, b = [], buf = new Buffer(1);'); | |
| _bf($body ...); | |
| } | |
| } | |
| macro _bf { | |
| case (>) => { | |
| eval('p++;'); | |
| } |
| macro $if { | |
| case ($x ...) => { if (relCar($x ...)) } | |
| } | |
| macro $while { | |
| case ($x ...) => { while (relCar($x ...)) } | |
| } | |
| // naive form: | |
| /* |
| macro $do { | |
| case { $y:expr } => { | |
| $y | |
| } | |
| case { $x:ident <- $y:expr $rest ... } => { | |
| λ['>=']($y, function($x) { | |
| return $do { $rest ... } | |
| }); | |
| } | |
| } |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)