-define(ELEMENT_BASE(Module),
module=Module :: atom(),
id :: id(),
class="" :: class() | [class()],
style="" :: text()
).
-record(button, {?ELEMENT_BASE(element_button),
text = "" :: text(),
body = "" :: body()
}).
test() -> #button{id=button, text = "submit"}.
The erlang plugin cannot resolve/evaluate the record definiton, if
a macro is used within the record definition.
For example, in the button example, the id field cannot be resolved.
The erlang plugin cannot resolve/evaluate the record definiton, if a macro is used within the record definition. For example, in the button example, the id field cannot be resolved.