view samples/logical.tp @ 217:adad61ea2f3a

Switched to a less hacky implementation of hygiene and exposed more AST properties to macros
author Michael Pavone <pavone@retrodev.com>
date Sat, 21 Dec 2013 12:07:51 -0800
parents 59a94f3ad56f
children
line wrap: on
line source

#{

	foo <- {
		print: "foo\n"
		true
	}
	
	bar <- {
		print: "bar\n"
		false
	}
	
	baz <- {
		print: "baz\n"
		true
	}
	
	qux <- {
		print: "shouldn't be printed\n"
		true
	}
	
	
	main <- {
		foo && bar || (baz || qux)
	}

}