1.7.0 • Published 1 year ago

twig-ast v1.7.0

Weekly downloads
16
License
MIT
Repository
github
Last release
1 year ago

Twig-AST

Parses Twig templates into an AST.

Usage

const TwigAST = require('twig-ast');
const ASTUtils = require('twig-ast/dist/print');

const ast = TwigAST.toAST('Hello {{planet}}');

ASTUtils.print(ast);

Returns

Tree                                  Derived from
-----                                 -------------
  TEXT                                "Hello {{planet}}"
  ├ LITERAL                           "Hello "
  ├ TAG_OUTPUT                        "{{planet}}"
  │ └ EXPRESSION                      "planet"
  │   └ VARIABLE (planet)             "planet"
  └ LITERAL                           ""

Contribute

We really appreciate any contribution you would like to make, so don't hesitate to report issues or submit pull requests.

License

This project is released under a MIT license.

About us

If you would like to know more about us, be sure to have a look at our website, or our Twitter accounts Ambassify, Sitebase, JorgenEvens

1.7.0

1 year ago

1.6.6

5 years ago

1.6.5

5 years ago

1.6.4

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.1

5 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago