Skip to content

Commit 43661db

Browse files
committed
glayzzle#46 add a specific node for nowdoc elements
1 parent fefbccf commit 43661db

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/ast/nowdoc.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*!
2+
* Copyright (C) 2017 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
7+
var Literal = require('./literal');
8+
var KIND = 'nowdoc';
9+
10+
/**
11+
* Defines a nowdoc string
12+
* @constructor String
13+
* @extends {Literal}
14+
* @property {String} label
15+
16+
*/
17+
var Nowdoc = Literal.extends(function Nowdoc(value, label, location) {
18+
Literal.apply(this, [KIND, value, location]);
19+
this.label = label;
20+
});
21+
22+
module.exports = Nowdoc;

0 commit comments

Comments
 (0)