php-parser
Version:
Parse PHP code from JS and returns its AST
27 lines (24 loc) • 642 B
JavaScript
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
;
const Statement = require("./statement");
const KIND = "case";
/**
* A switch case statement
* @constructor Case
* @memberOf module:php-parser
* @extends {Statement}
* @property {Expression|null} test - if null, means that the default case
* @property {Block|null} body
*/
module.exports = Statement.extends(
KIND,
function Case(test, body, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.test = test;
this.body = body;
},
);