Commit Graph

117 Commits

Author SHA1 Message Date
Ulf Wiger
acdf2aec91 make exprecs handle typed_record_fields 2016-06-22 20:51:10 +02:00
Ulf Wiger
4fadce8a52 re-generate docs with new edown 2015-10-31 00:49:30 +01:00
Ulf Wiger
68a87e656c re-generated docs 2015-10-30 19:37:05 +01:00
Ulf Wiger
0a67c98cd1 Merge pull request #18 from uwiger/uw-export-types
export types generated by exprecs
2015-10-30 20:13:27 +01:00
Ulf Wiger
c7fccf94e9 updated doc example in exprecs 2015-10-30 19:25:49 +01:00
Ulf Wiger
f8c41d315e export types generated by exprecs 2015-10-30 16:27:40 +01:00
Ulf Wiger
a210adafdf Merge pull request #16 from odo/master
switching to Erlang/OTP 18.0 compatible version of edown
2015-06-27 11:17:48 +02:00
odo
a06df663bb switching to Erlang/OTP 18.0 compatible version of edown: 0.7 2015-06-26 19:19:28 +00:00
odo
468b34e97c switching to Erlang/OTP 18.0 compatible version of edown 2015-06-26 12:55:54 +00:00
Ulf Wiger
5a7bba2697 check {compile_options,Os} in transform_module 2014-12-17 16:47:02 +01:00
Ulf Wiger
aa74eee285 support keeping/renaming function being replaced 2014-11-30 23:44:49 +01:00
Ulf Wiger
82cc00264a Merge pull request #14 from martinrehfeld/master
Fix edown dependency in rebar.config
2014-09-23 17:36:10 +02:00
Martin Rehfeld
58ba784579 Fix edown dependency in rebar.config
The pathspec for edown needs to be a tag (there is no `0.5` branch in edown).
2014-09-23 17:10:57 +02:00
Ulf Wiger
eaf461516e set uwiger/parse_trans as root, fix email & copyrights 2014-09-18 17:31:03 +02:00
Ulf Wiger
2adfbfcc17 Merge pull request #13 from roland-karlsson-erlang-solutions-com/master
Fixing type problem for '#get-REC'/2
2014-03-21 20:00:21 +01:00
Roland Karlsson
3ef25f1355 The list case of '#get-REC'/2 set to type '#get-REC'([any()],_) -> [any()]. 2014-03-19 14:47:13 +01:00
Ulf Wiger
01ee39582b Merge pull request #12 from efcasado/master
Fix type error in '#info-r'/-2
2014-03-18 17:32:35 +01:00
Enrique Fernandez
298d416347 Fix type error in '#info-r'/-2 2014-03-18 16:47:55 +01:00
Ulf Wiger
763462825e documented revert workaround 2013-12-19 13:52:01 +01:00
Ulf Wiger
191701fbf5 Merge branch 'master' of github.com:uwiger/parse_trans 2013-12-19 13:45:19 +01:00
Ulf Wiger
1a6cadd7bc workaround for R16B03 revert/lint bug 2013-12-19 12:22:57 +01:00
Ulf Wiger
45e4d9a25f merge esl and uwiger repos 2013-12-12 14:36:30 +01:00
Ulf Wiger
f89567ec01 empty records broke exprecs in #lens- 2013-12-12 14:20:47 +01:00
Ulf Wiger
b3e5372047 use installed rebar, if exists 2013-10-14 16:06:30 +02:00
Ulf Wiger
3d8a01f547 Merge pull request #8 from ddosia/dch-fix-exprec-spec
Fix #7 wrong type spec genration inside exprecs.
2013-09-04 04:18:44 -07:00
Churikov Daniil
50b95ddaf9 Fix wrong type spec genration inside exprecs. 2013-09-03 18:11:11 +04:00
Ulf Wiger
ca7106e166 Merge pull request #8 from essen/fix-compile
Fix compile
2013-07-03 02:48:46 -07:00
Loïc Hoguin
5fbd995975 Update rebar
The main purpose of this update is to make it work with
erlang.mk and other non-rebar build tools. Rebar now
supports a REBAR_DEPS_DIR environment variable making
this possible.
2013-07-02 19:24:02 +02:00
Loïc Hoguin
62b927e3c1 Fix compilation (dependency wasn't fetched) 2013-07-02 19:23:38 +02:00
Ulf Wiger
663ddebb6e codegen:gen_function_alt/3 2013-04-03 23:55:31 +02:00
Ulf Wiger
f889dea6ee added codegen:gen_function_alt/3 2013-04-02 22:47:55 +02:00
Ulf Wiger
86d94e3248 slightly better error messages for codegen:gen_module/3 2013-03-12 15:35:45 +01:00
Ulf Wiger
fb08d7eedf Merge pull request #7 from legoscia/is_record_overlapping_contracts
Fix "overlapping domain" Dialyzer warning for '#is_record-'/{1,2}
2013-03-05 10:35:28 -08:00
Magnus Henoch
d2ead76e7d Fix "overlapping domain" Dialyzer warning for '#is_record-'/{1,2}
These contracts will usually not be seen by the user, and are ignored
by Dialyzer because they have overlapping domains, so there is not
much point in using them.  Replace with simpler contracts for now.
2013-03-05 16:09:49 +00:00
Ulf Wiger
072a7ef0ab exprecs now also generates functional lenses 2013-01-24 21:17:46 +01:00
Ulf Wiger
b372ea5153 Support for -pt_renumber(true | false) attribute
This attribute instructs parse_trans to renumber the abstract forms, incrementing
the line number for each form. Combined with -pt_log_forms(true), it can be of
use when tracking down compiler errors that result from code produced in the
parse transform.
2013-01-24 16:46:32 +01:00
Ulf Wiger
f83f77c2cc codegen:gen_module/3 support 2012-12-19 17:30:23 +01:00
Ulf Wiger
c55c8861cd Added revert_form/1; deal with revert bugs 2012-12-19 17:29:53 +01:00
Ulf Wiger
895a157dc9 improved error reporting, return/2, format_exception/2 2012-12-18 15:50:17 +01:00
Ulf Wiger
38b2183a9e added LC form to codegen:gen_function/2 2012-12-14 22:57:47 +01:00
Ulf Wiger
a812823fdb Merge pull request #3 from JoeOsborn/permit-non-top-level-forms
Tolerate parse_transforming non-top-level forms.
2012-12-12 10:57:27 -08:00
Joe Osborn
9b594f639b Tolerate parse_transforming non-top-level forms.
A few changes were made to provide default values for context attributes so that parse_transform:transform/4 could be called for non-top-level forms. I don't know if this is generally useful or if it just fit my weird use case.
2012-12-12 07:38:39 -08:00
Ulf Wiger
ae7163f3db For fun, implemented a 'pmod' parse transform.
See examples/pmod.erl and examples/ex_pmod.erl
This works similarly to OTP's parameterized modules, which they are
now saying that they will drop. Since they drop the compiler support,
a slightly different notation is needed.

-pmod_vars([V1, V2, ...]). % defines the 'global' variables.
-pmod_funs([F1/A1, ...]).  % defines which functions are to be exported.

The functions listed in -pmod_funs/1 are transformed to take an extra
argument, and a new(V1, V2, ...) function is added and exported.

Example:

Eshell V5.9  (abort with ^G)
1> c(ex_pmod).
{ok,ex_pmod}
2> M = ex_pmod:new(a,b).
{ex_pmod,{a,b}}
3> M:b(x,y).
{x,y,a,b}
2012-10-12 19:34:03 +02:00
Ulf Wiger
e3676f4a6b lists:concat() -> lists:append() 2012-08-16 13:55:14 +02:00
Ulf Wiger
216531d99f Merge pull request #6 from nox/let-errors-through
Let error markers through parse_transform:do/5
2012-04-23 23:34:04 -07:00
Anthony Ramine
11f137a461 Let error markers through parse_transform:do/5
Error markers ({error, Term} tuples) in Forms are special-cased by do/5
and make it return a error tuple itself instead of just letting them
through. I don't think it is good behaviour as the compiler and its
friends already handle error markers correctly. Furthermore it makes
parse_trans_codegen:parse_transform/2 fails when passing the error tuple
to parse_trans:revert/1.
2012-04-23 22:23:23 +02:00
Ulf Wiger
0ec1da744e corrected license texts (EPL 1.1) 2012-03-05 18:36:32 +01:00
Ulf Wiger
f84867ab1a fix function_clause crash in exprecs + minor fixes 2012-02-05 23:12:49 +01:00
Ulf Wiger
7100aa21e7 only include exported recs in f_get 2012-02-02 16:59:28 +01:00
Ulf Wiger
c2ea01ef23 update edoc 2012-01-28 18:34:03 +01:00