8000 GitHub - vinod-hg/epp_macro_enhance: Enhancement to Erlang epp module to handle complex user defined macros
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vinod-hg/epp_macro_enhance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

epp_macro_enhance

Enhancement to Erlang epp module to handle complex user defined macros

Current epp module does not handle functions as macros. Function is passed instead of its structure which cannot be handled.

This is enhanced by adding a new function clause (three new lines) with the type as complex.

open(FileName, IncludePath, PredefMacros) -> {ok, Epp} | {error, ErrorDescriptor}

parse_file(FileName, IncludePath, PredefMacros) -> {ok, [Form]} | {error, OpenError}

PredefMacros = macros() macros() = [{atom(), term()}] | [{atom(), Args, Definition}] Args = [atom()] Definition = string()

Calling Example

epp:parse_file("../src/macro_test.erl", [], [{'MUL', ['A','B'], "fun()-> io:format("~p~p = ~p", [A,B,AB]) end" , complex}]),

About

Enhancement to Erlang epp module to handle complex user defined macros

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0