Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S sweet-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • sweet-js
  • sweet-core
  • Wiki
  • Example macros

Example macros · Changes

Page history
Add constexpr. authored Oct 25, 2014 by Havvy's avatar Havvy
Show whitespace changes
Inline Side-by-side
Example-macros.md
View page @ 84faf8dc
......@@ -2,7 +2,7 @@ Links to some example macros. If you've written a cool macro and want to share p
Note that these gists aren't necessarily kept up to date and might not work with the current version of sweet.js.
* [C-style assert() function](https://gist.github.com/TooTallNate/baa25c0a58b7bd181bab)
* [C-style assert() function](https://gist.github.com/TooTallNate/baa25c0a58b7bd181bab) - No longer working
* [haskell style do-notation](https://gist.github.com/3831514) (update for v0.3.x [here](https://gist.github.com/Nami-Doc/8230304))
* [fragment of scheme](https://gist.github.com/3854258) (update for v0.3.x [here](https://gist.github.com/Nami-Doc/8230315))
* [var destructuring](https://gist.github.com/grncdr/4554165)
......@@ -29,3 +29,4 @@ Note that these gists aren't necessarily kept up to date and might not work with
* [sweetreaction](https://github.com/myfreeweb/sweetreaction) macros for the React library
* [tail call 'optimization'](https://gist.github.com/J-Chaniotis/4d4f516de7bd0acd38a8)
* [JSHint-clean array/object iterators & array comprehensions](https://gist.github.com/09d7fb45cd510f37b70f)
* [constexpr - evaluate expressions at compile time](https://gist.github.com/natefaubion/f4be4c8531ef45de87b4)
Clone repository
  • Example macros
  • FAQ
  • High level design overview
  • Home
  • Macro resources
  • Patterns
  • Syntax Case
  • case api
  • custom operators
  • design
  • expander design
  • modules
  • node loader
  • pattern_class
  • reader scratch
View All Pages