forked from glayzzle/php-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathif.js
More file actions
33 lines (31 loc) · 708 Bytes
/
if.js
File metadata and controls
33 lines (31 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Statement = require("./statement");
const KIND = "if";
/**
* Defines a if statement
* @constructor If
* @extends {Statement}
* @property {Expression} test
* @property {Block} body
* @property {Block|If|null} alternate
* @property {boolean} shortForm
*/
module.exports = Statement.extends(KIND, function If(
test,
body,
alternate,
shortForm,
docs,
location
) {
Statement.apply(this, [KIND, docs, location]);
this.test = test;
this.body = body;
this.alternate = alternate;
this.shortForm = shortForm;
});