Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
Expander lets one run code in other code by allowing one to define functions
that are expanded out by executing them and putting their results back in the
file. The prupose is that given a file or directory, we can expand "macros"
using a given language.

For example:

Macro definition ("hello" is the name, and "python" is the language):
??defm:hello:python(arg1, arg2){{
print "puts 'Hello, %s!!!' \n%s" % (arg1, arg2)
}}

Macro call (eg, in ruby code):
??hello??'Joe'??'puts "Why, dude?"'??

Result:
puts 'Hello, Joe!!!'
puts "Why, dude?"

To call:
python expander.py [FILE|DIRECTORY]

If a file is passed in, the expanded output is printed to stdout. If a
directory is passed in, all files matching *.exp.* will be expanded into
*.* (the '.exp.' being removed).

About

Defines a sort of macro like language that can run any language in a text file and output the expanded result.

Topics

Resources

Releases

No releases published

Packages

No packages published