Skip to content

Scriptor/phunc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phunc

An attempt at creating a Clojure to PHP compiler. Currently way before alpha, like, in the Phoenician alphabet or something. For now the aim is to take Clojure code (as data) and generate the appropriate PHP code. No parsing or anything fancy like that yet.

Usage

Currently there's a test function that takes a single expression and prints the resulting PHP code. The following language features are implemented:

  • variables: 'a -> $a
  • function calls: '(foo (bar a)) -> foo(bar($a))
  • vectors: '[1 2 (foo a)] -> array(1, 2, (foo $a))
  • if form: (if a b c) -> if($a){$b;}{$c;}

License

Copyright (C) 2012 FIXME

Distributed under the Eclipse Public License, the same as Clojure.

...If you say so Leiningen.

About

An attempt at Clojure -> PHP (mostly to learn the Clojure bit)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published