CordyJ / OpenTxl

TXL programming language compiler/interpreter
Other
18 stars 1 forks source link

Rules should not search inside attributes #11

Closed CordyJ closed 10 months ago

CordyJ commented 10 months ago

Attributes are not part of the source being transformed, rather annotations on it. Thus rules and functions should not search inside anything of type [attr X] for any [X]. If internal transforming of attributes is required, they can be explicitly matched and rules applied inside them.

CordyJ commented 10 months ago

This can be achieved using multi-skipping, since the overall performance cost would be high to implement this otherwise. If we want to skip an attribute [attr X], we just change it to [attr attr_X], and use skipping [attr_X].