Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro Tags #4

Closed
marcioAlmada opened this issue Oct 25, 2015 · 1 comment
Closed

Macro Tags #4

marcioAlmada opened this issue Oct 25, 2015 · 1 comment

Comments

@marcioAlmada
Copy link
Owner

Allow macros to have tags that modify macro behavior:

macro ·foo ·bar { A } >> { B }

The macro above has the tags foo and bar. Tags with no specific meanings are just ignored.

marcioAlmada added a commit that referenced this issue Oct 25, 2015
Macro tags are just macro flags that serve as metadata. The
following macro has 'foo', 'bar' and 'baz' tags:

```
macro ·foo ·bar ·baz { A } >> { B }
```
@marcioAlmada
Copy link
Owner Author

@marcioAlmada marcioAlmada mentioned this issue Oct 25, 2015
40 tasks
marcioAlmada added a commit that referenced this issue Feb 12, 2018
Added `expression()` parser with support for registering new operators. There is
no macro support for declaring and visiting the newly added operator AST during expansions
right now, so macro based operators will come later.

Relates to #42 and preprocess/pre-short-closures/issues/#4
Fixes #43
marcioAlmada added a commit that referenced this issue Feb 12, 2018
`Parser::optmize()` makes difference on very complex parser stacks, like
`expression()`. Activating and deactivating the optimizations should yield
all the tests passed, except that with optimizations off the results are generally:

```
Time: 15.49 seconds, Memory: 168.46MB // high mem usage, slow :(
```

And with optimizations turned on, results should be:

```
Time: 763 ms, Memory: 16.00MB // low mem usage, much faster :D
```

The optimization can be activated on macros declarations as well:

```
macro ·optimize {
    [...]
} >> {
    [...]
}
```

Relates to #42 and #43 and preprocess/pre-short-closures/issues/#4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant