| 1 | package Text::Nunjucks::Nodes::If; | ||
| 2 | # ABSTRACT: AST node If (fields cond, body, else_), ported from nodes.js | ||
| 3 | |||
| 4 | 20 | our $VERSION = '0.001'; | |
| 5 | |||
| 6 | 20 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 20 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 20 | extends 'Text::Nunjucks::Nodes::Node'; | |
| 10 | |||
| 11 | # nodes.js: const If = Node.extend('If', { fields: ['cond', 'body', 'else_'] }); | ||
| 12 | |||
| 13 | 20 | has cond => ( is => 'rw' ); | |
| 14 | 20 | has body => ( is => 'rw' ); | |
| 15 | 20 | has else_ => ( is => 'rw' ); | |
| 16 | |||
| 17 | 2096 | ▶ | sub typename { 'If' } |
|
Subroutine
typename: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 18 | 13547 | ▶ | sub fields { [ 'cond', 'body', 'else_' ] } |
|
Subroutine
fields: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 19 | |||
| 20 | 20 | 1; | |
| 21 | |||
| 22 | __END__ | ||