Navigation

  • index
  • next |
  • previous |
  • MacroPy3 1.1.0 documentation »

Previous topic

30,000ft Overview

Next topic

An AST crash course

Table of Contents

Contents:

  • 30,000ft Overview
  • Tutorials
    • An AST crash course
    • Writing Your First Macro
    • Making your Macros Hygienic
    • Exporting your Expanded Code
  • Demo Macros
  • Experimental Macros
  • Discussion
  • Reference

Quick search

TutorialsΒΆ

This section contains step-by-step guides to get started writing macros using MacroPy:

Contents:

  • An AST crash course
    • Third-party must read documentation
    • Use an AST pretty printer
    • AST node classes are picky and underdeveloped
  • Writing Your First Macro
    • Using Quasiquotes
    • Walking the AST
    • More Walking
  • Making your Macros Hygienic
    • gen_sym
    • Hygienic Quasiquotes
    • Manual Imports
    • hq
    • Breaking Hygiene
    • expose_unhygienic
  • Exporting your Expanded Code
    • NullExporter()
    • SaveExporter(target, root)
    • Pre-expanding the MacroPy Test Suite
    • PycExporter()

These tutorials proceed through a serious of examples, many of which are available in the docs/examples folder.

Navigation

  • index
  • next |
  • previous |
  • MacroPy3 1.1.0 documentation »
© Copyright 2013-2018 Li Haoyi, Justin Holmgren, Alberto Berti. Created using Sphinx 1.8.5.