Fix bin/publish: copy docs.dist from project root

Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-21 02:08:33 +00:00
commit f6fac6c4bc
79758 changed files with 10547827 additions and 0 deletions

591
node_modules/php-parser/src/ast.js generated vendored Executable file
View File

@@ -0,0 +1,591 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Location = require("./ast/location");
const Position = require("./ast/position");
/**
* ## Class hierarchy
*
* - [Location](#location)
* - [Position](#position)
* - [Node](#node)
* - [Noop](#noop)
* - [NullKeyword](#nullkeyword)
* - [StaticVariable](#staticvariable)
* - [EncapsedPart](#encapsedpart)
* - [Constant](#constant)
* - [Identifier](#identifier)
* - [Reference](#reference)
* - [TypeReference](#typereference)
* - [ParentReference](#parentreference)
* - [StaticReference](#staticreference)
* - [SelfReference](#selfreference)
* - [Name](#name)
* - [TraitUse](#traituse)
* - [TraitAlias](#traitalias)
* - [TraitPrecedence](#traitprecedence)
* - [Comment](#comment)
* - [CommentLine](#commentline)
* - [CommentBlock](#commentblock)
* - [Error](#error)
* - [Expression](#expression)
* - [Entry](#entry)
* - [ArrowFunc](#arrowfunc)
* - [Closure](#closure)
* - [ByRef](#byref)
* - [Silent](#silent)
* - [RetIf](#retif)
* - [New](#new)
* - [Include](#include)
* - [Call](#call)
* - [Eval](#eval)
* - [Exit](#exit)
* - [Clone](#clone)
* - [Assign](#assign)
* - [AssignRef](#assignref)
* - [Array](#array)
* - [List](#list)
* - [Variable](#variable)
* - [Variadic](#variadic)
* - [Yield](#yield)
* - [YieldFrom](#yieldfrom)
* - [Print](#print)
* - [Isset](#isset)
* - [Empty](#empty)
* - [Lookup](#lookup)
* - [PropertyLookup](#propertylookup)
* - [StaticLookup](#staticlookup)
* - [OffsetLookup](#offsetlookup)
* - [Operation](#operation)
* - [Pre](#pre)
* - [Post](#post)
* - [Bin](#bin)
* - [Unary](#unary)
* - [Cast](#cast)
* - [Literal](#literal)
* - [Boolean](#boolean)
* - [String](#string)
* - [Number](#number)
* - [Inline](#inline)
* - [Magic](#magic)
* - [Nowdoc](#nowdoc)
* - [Encapsed](#encapsed)
* - [Statement](#statement)
* - [ConstantStatement](#constantstatement)
* - [ClassConstant](#classconstant)
* - [Return](#return)
* - [Label](#label)
* - [Continue](#continue)
* - [Case](#case)
* - [Break](#break)
* - [Echo](#echo)
* - [Unset](#unset)
* - [Halt](#halt)
* - [Declare](#declare)
* - [Global](#global)
* - [Static](#static)
* - [If](#if)
* - [Do](#do)
* - [While](#while)
* - [For](#for)
* - [Foreach](#foreach)
* - [Switch](#switch)
* - [Goto](#goto)
* - [Try](#try)
* - [Catch](#catch)
* - [Throw](#throw)
* - [UseGroup](#usegroup)
* - [UseItem](#useitem)
* - [Block](#block)
* - [Program](#program)
* - [Namespace](#namespace)
* - [PropertyStatement](#propertystatement)
* - [Property](#property)
* - [Declaration](#declaration)
* - [Class](#class)
* - [Interface](#interface)
* - [Trait](#trait)
* - [Function](#function)
* - [Method](#method)
* - [Parameter](#parameter)
* ---
*/
/**
* The AST builder class
* @constructor AST
* @memberOf module:php-parser
* @tutorial AST
* @property {Boolean} withPositions - Should locate any node (by default false)
* @property {Boolean} withSource - Should extract the node original code (by default false)
*/
const AST = function (withPositions, withSource) {
this.withPositions = withPositions;
this.withSource = withSource;
};
// operators in ascending order of precedence
AST.precedence = {};
[
["or"],
["xor"],
["and"],
["="],
["?"],
["??"],
["||"],
["&&"],
["|"],
["^"],
["&"],
["==", "!=", "===", "!==", /* '<>', */ "<=>"],
["<", "<=", ">", ">="],
["<<", ">>"],
["+", "-", "."],
["*", "/", "%"],
["!"],
["instanceof"],
["cast", "silent"],
["**"],
// TODO: [ (array)
// TODO: clone, new
].forEach(function (list, index) {
list.forEach(function (operator) {
AST.precedence[operator] = index + 1;
});
});
/**
* @private
* @function AST#isRightAssociative
* @memberOf module:php-parser
* @param operator
* @return {boolean}
*/
AST.prototype.isRightAssociative = function (operator) {
return operator === "**" || operator === "??";
};
/**
* Change parent node informations after swapping childs
* @private
* @function AST#swapLocations
* @memberOf module:php-parser
*/
AST.prototype.swapLocations = function (target, first, last, parser) {
if (this.withPositions) {
target.loc.start = first.loc.start;
target.loc.end = last.loc.end;
if (this.withSource) {
target.loc.source = parser.lexer._input.substring(
target.loc.start.offset,
target.loc.end.offset,
);
}
}
};
/**
* Includes locations from first & last into the target
* @private
* @function AST#resolveLocations
* @memberOf module:php-parser
*/
AST.prototype.resolveLocations = function (target, first, last, parser) {
if (this.withPositions) {
if (target.loc.start.offset > first.loc.start.offset) {
target.loc.start = first.loc.start;
}
/* istanbul ignore next */
if (target.loc.end.offset < last.loc.end.offset) {
target.loc.end = last.loc.end;
}
if (this.withSource) {
target.loc.source = parser.lexer._input.substring(
target.loc.start.offset,
target.loc.end.offset,
);
}
}
};
/**
* Check and fix precence, by default using right
* @private
* @function AST#resolvePrecedence
* @memberOf module:php-parser
*/
AST.prototype.resolvePrecedence = function (result, parser) {
let buffer, lLevel, rLevel;
// handling precendence
if (result.kind === "call") {
// including what argument into location
this.resolveLocations(result, result.what, result, parser);
} else if (
result.kind === "propertylookup" ||
result.kind === "staticlookup" ||
(result.kind === "offsetlookup" && result.offset)
) {
// including what argument into location
this.resolveLocations(result, result.what, result.offset, parser);
} else if (result.kind === "bin") {
if (result.right && !result.right.parenthesizedExpression) {
if (result.right.kind === "bin") {
lLevel = AST.precedence[result.type];
rLevel = AST.precedence[result.right.type];
if (
lLevel &&
rLevel &&
rLevel <= lLevel &&
(result.type !== result.right.type ||
!this.isRightAssociative(result.type))
) {
// https://github.com/glayzzle/php-parser/issues/79
// shift precedence
buffer = result.right;
result.right = result.right.left;
this.swapLocations(result, result.left, result.right, parser);
buffer.left = this.resolvePrecedence(result, parser);
this.swapLocations(buffer, buffer.left, buffer.right, parser);
result = buffer;
}
} else if (result.right.kind === "retif") {
lLevel = AST.precedence[result.type];
rLevel = AST.precedence["?"];
if (lLevel && rLevel && rLevel <= lLevel) {
buffer = result.right;
result.right = result.right.test;
this.swapLocations(result, result.left, result.right, parser);
buffer.test = this.resolvePrecedence(result, parser);
this.swapLocations(buffer, buffer.test, buffer.falseExpr, parser);
result = buffer;
}
}
}
} else if (
(result.kind === "silent" || result.kind === "cast") &&
result.expr &&
!result.expr.parenthesizedExpression
) {
// https://github.com/glayzzle/php-parser/issues/172
if (result.expr.kind === "bin") {
buffer = result.expr;
result.expr = result.expr.left;
this.swapLocations(result, result, result.expr, parser);
buffer.left = this.resolvePrecedence(result, parser);
this.swapLocations(buffer, buffer.left, buffer.right, parser);
result = buffer;
} else if (result.expr.kind === "retif") {
buffer = result.expr;
result.expr = result.expr.test;
this.swapLocations(result, result, result.expr, parser);
buffer.test = this.resolvePrecedence(result, parser);
this.swapLocations(buffer, buffer.test, buffer.falseExpr, parser);
result = buffer;
}
} else if (result.kind === "unary") {
// https://github.com/glayzzle/php-parser/issues/75
if (result.what && !result.what.parenthesizedExpression) {
// unary precedence is always lower
if (result.what.kind === "bin") {
buffer = result.what;
result.what = result.what.left;
this.swapLocations(result, result, result.what, parser);
buffer.left = this.resolvePrecedence(result, parser);
this.swapLocations(buffer, buffer.left, buffer.right, parser);
result = buffer;
} else if (result.what.kind === "retif") {
buffer = result.what;
result.what = result.what.test;
this.swapLocations(result, result, result.what, parser);
buffer.test = this.resolvePrecedence(result, parser);
this.swapLocations(buffer, buffer.test, buffer.falseExpr, parser);
result = buffer;
}
}
} else if (result.kind === "retif") {
// https://github.com/glayzzle/php-parser/issues/77
if (
result.falseExpr &&
result.falseExpr.kind === "retif" &&
!result.falseExpr.parenthesizedExpression
) {
buffer = result.falseExpr;
result.falseExpr = buffer.test;
this.swapLocations(result, result.test, result.falseExpr, parser);
buffer.test = this.resolvePrecedence(result, parser);
this.swapLocations(buffer, buffer.test, buffer.falseExpr, parser);
result = buffer;
}
} else if (result.kind === "assign") {
// https://github.com/glayzzle/php-parser/issues/81
if (
result.right &&
result.right.kind === "bin" &&
!result.right.parenthesizedExpression
) {
lLevel = AST.precedence["="];
rLevel = AST.precedence[result.right.type];
// only shifts with and, xor, or
if (lLevel && rLevel && rLevel < lLevel) {
buffer = result.right;
result.right = result.right.left;
buffer.left = result;
this.swapLocations(buffer, buffer.left, result.right, parser);
result = buffer;
}
}
} else if (result.kind === "expressionstatement") {
this.swapLocations(result, result.expression, result, parser);
}
return result;
};
/**
* Prepares an AST node
* @private
* @function AST#prepare
* @memberOf module:php-parser
* @param {String|null} kind - Defines the node type
* @param {*} docs - (if null, the kind must be passed at the function call)
* @param {Parser} parser - The parser instance (use for extracting locations)
* @return {Function}
*/
AST.prototype.prepare = function (kind, docs, parser) {
let start = null;
if (this.withPositions || this.withSource) {
start = parser.position();
}
const self = this;
// returns the node
const result = function () {
let location = null;
const args = Array.prototype.slice.call(arguments);
args.push(docs);
if (self.withPositions || self.withSource) {
let src = null;
if (self.withSource) {
src = parser.lexer._input.substring(start.offset, parser.prev[2]);
}
// if with source, need location on swapLocations function
location = new Location(
src,
start,
new Position(parser.prev[0], parser.prev[1], parser.prev[2]),
);
// last argument is always the location
args.push(location);
}
// handle lazy kind definitions
if (!kind) {
kind = args.shift();
}
// build the object
const node = self[kind];
if (typeof node !== "function") {
throw new Error('Undefined node "' + kind + '"');
}
const astNode = Object.create(node.prototype);
node.apply(astNode, args);
result.instance = astNode;
/* istanbul ignore next */
if (result.trailingComments) {
// buffer of trailingComments
astNode.trailingComments = result.trailingComments;
}
if (typeof result.postBuild === "function") {
result.postBuild(astNode);
}
if (parser.debug) {
delete self.stack[result.stackUid];
}
return self.resolvePrecedence(astNode, parser);
};
if (parser.debug) {
if (!this.stack) {
this.stack = {};
this.stackUid = 1;
}
this.stack[++this.stackUid] = {
position: start,
stack: new Error().stack.split("\n").slice(3, 5),
};
result.stackUid = this.stackUid;
}
/**
* Sets a list of trailing comments
* @private
* @param {*} docs
*/
result.setTrailingComments = function (docs) {
if (result.instance) {
// already created
result.instance.setTrailingComments(docs);
} else {
result.trailingComments = docs;
}
};
/**
* Release a node without using it on the AST
* @private
* @param {*} target
*/
result.destroy = function (target) {
if (docs) {
// release current docs stack
if (target) {
if (!target.leadingComments) {
target.leadingComments = docs;
} else {
target.leadingComments = docs.concat(target.leadingComments);
}
} else {
parser._docIndex = parser._docs.length - docs.length;
}
}
if (parser.debug) {
delete self.stack[result.stackUid];
}
};
return result;
};
AST.prototype.checkNodes = function () {
const errors = [];
for (const k in this.stack) {
if (Object.prototype.hasOwnProperty.call(this.stack, k)) {
this.stack[k].key = k;
errors.push(this.stack[k]);
}
}
this.stack = {};
return errors;
};
// Define all AST nodes
[
require("./ast/array"),
require("./ast/arrowfunc"),
require("./ast/assign"),
require("./ast/assignref"),
require("./ast/attribute"),
require("./ast/attrgroup"),
require("./ast/bin"),
require("./ast/block"),
require("./ast/boolean"),
require("./ast/break"),
require("./ast/byref"),
require("./ast/call"),
require("./ast/case"),
require("./ast/cast"),
require("./ast/catch"),
require("./ast/class"),
require("./ast/classconstant"),
require("./ast/clone"),
require("./ast/closure"),
require("./ast/comment"),
require("./ast/commentblock"),
require("./ast/commentline"),
require("./ast/constant"),
require("./ast/constantstatement"),
require("./ast/continue"),
require("./ast/declaration"),
require("./ast/declare"),
require("./ast/declaredirective"),
require("./ast/do"),
require("./ast/echo"),
require("./ast/empty"),
require("./ast/encapsed"),
require("./ast/encapsedpart"),
require("./ast/entry"),
require("./ast/enum"),
require("./ast/enumcase"),
require("./ast/error"),
require("./ast/eval"),
require("./ast/exit"),
require("./ast/expression"),
require("./ast/expressionstatement"),
require("./ast/for"),
require("./ast/foreach"),
require("./ast/function"),
require("./ast/global"),
require("./ast/goto"),
require("./ast/halt"),
require("./ast/identifier"),
require("./ast/if"),
require("./ast/include"),
require("./ast/inline"),
require("./ast/interface"),
require("./ast/intersectiontype"),
require("./ast/isset"),
require("./ast/label"),
require("./ast/list"),
require("./ast/literal"),
require("./ast/lookup"),
require("./ast/magic"),
require("./ast/match"),
require("./ast/matcharm"),
require("./ast/method"),
require("./ast/name"),
require("./ast/namespace"),
require("./ast/namedargument"),
require("./ast/new"),
require("./ast/node"),
require("./ast/noop"),
require("./ast/nowdoc"),
require("./ast/nullkeyword"),
require("./ast/nullsafepropertylookup"),
require("./ast/number"),
require("./ast/offsetlookup"),
require("./ast/operation"),
require("./ast/parameter"),
require("./ast/parentreference"),
require("./ast/post"),
require("./ast/pre"),
require("./ast/print"),
require("./ast/program"),
require("./ast/property"),
require("./ast/propertylookup"),
require("./ast/propertystatement"),
require("./ast/reference"),
require("./ast/retif"),
require("./ast/return"),
require("./ast/selfreference"),
require("./ast/silent"),
require("./ast/statement"),
require("./ast/static"),
require("./ast/staticvariable"),
require("./ast/staticlookup"),
require("./ast/staticreference"),
require("./ast/string"),
require("./ast/switch"),
require("./ast/throw"),
require("./ast/trait"),
require("./ast/traitalias"),
require("./ast/traitprecedence"),
require("./ast/traituse"),
require("./ast/try"),
require("./ast/typereference"),
require("./ast/unary"),
require("./ast/uniontype"),
require("./ast/unset"),
require("./ast/usegroup"),
require("./ast/useitem"),
require("./ast/variable"),
require("./ast/variadic"),
require("./ast/variadicplaceholder"),
require("./ast/while"),
require("./ast/yield"),
require("./ast/yieldfrom"),
].forEach(function (ctor) {
AST.prototype[ctor.kind] = ctor;
});
module.exports = AST;

44
node_modules/php-parser/src/ast/array.js generated vendored Executable file
View File

@@ -0,0 +1,44 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expr = require("./expression");
const KIND = "array";
/**
* Defines an array structure
* @constructor Array
* @memberOf module:php-parser
* @example
* // PHP code :
* [1, 'foo' => 'bar', 3]
*
* // AST structure :
* {
* "kind": "array",
* "shortForm": true
* "items": [
* {"kind": "number", "value": "1"},
* {
* "kind": "entry",
* "key": {"kind": "string", "value": "foo", "isDoubleQuote": false},
* "value": {"kind": "string", "value": "bar", "isDoubleQuote": false}
* },
* {"kind": "number", "value": "3"}
* ]
* }
* @extends {Expression}
* @property {Array<Entry|Expression|Variable>} items List of array items
* @property {boolean} shortForm Indicate if the short array syntax is used, ex `[]` instead `array()`
*/
module.exports = Expr.extends(
KIND,
function Array(shortForm, items, docs, location) {
Expr.apply(this, [KIND, docs, location]);
this.items = items;
this.shortForm = shortForm;
},
);

43
node_modules/php-parser/src/ast/arrowfunc.js generated vendored Executable file
View File

@@ -0,0 +1,43 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "arrowfunc";
/**
* Defines an arrow function (it's like a closure)
* @constructor ArrowFunc
* @memberOf module:php-parser
* @extends {Expression}
* @property {Parameter[]} arguments
* @property {Identifier} type
* @property {Expression} body
* @property {boolean} byref
* @property {boolean} nullable
* @property {boolean} isStatic
*/
module.exports = Expression.extends(
KIND,
function Closure(
args,
byref,
body,
type,
nullable,
isStatic,
docs,
location,
) {
Expression.apply(this, [KIND, docs, location]);
this.arguments = args;
this.byref = byref;
this.body = body;
this.type = type;
this.nullable = nullable;
this.isStatic = isStatic || false;
},
);

28
node_modules/php-parser/src/ast/assign.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "assign";
/**
* Assigns a value to the specified target
* @constructor Assign
* @memberOf module:php-parser
* @extends {Expression}
* @property {Expression} left
* @property {Expression} right
* @property {String} operator
*/
module.exports = Expression.extends(
KIND,
function Assign(left, right, operator, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.left = left;
this.right = right;
this.operator = operator;
},
);

27
node_modules/php-parser/src/ast/assignref.js generated vendored Executable file
View File

@@ -0,0 +1,27 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "assignref";
/**
* Assigns a value to the specified target
* @constructor AssignRef
* @memberOf module:php-parser
* @extends {Expression}
* @property {Expression} left
* @property {Expression} right
* @property {String} operator
*/
module.exports = Expression.extends(
KIND,
function AssignRef(left, right, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.left = left;
this.right = right;
},
);

21
node_modules/php-parser/src/ast/attrgroup.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "attrgroup";
/**
* Attribute group
* @memberOf module:php-parser
* @constructor AttrGroup
* @extends {Node}
* @property {Attribute[]} attrs
*/
module.exports = Node.extends(KIND, function AttrGroup(attrs, docs, location) {
Node.apply(this, [KIND, docs, location]);
this.attrs = attrs || [];
});

26
node_modules/php-parser/src/ast/attribute.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "attribute";
/**
* Attribute Value
* @memberOf module:php-parser
* @constructor Attribute
* @extends {Node}
* @property {String} name
* @property {Parameter[]} args
*/
module.exports = Node.extends(
KIND,
function Attribute(name, args, docs, location) {
Node.apply(this, [KIND, docs, location]);
this.name = name;
this.args = args;
},
);

27
node_modules/php-parser/src/ast/bin.js generated vendored Executable file
View File

@@ -0,0 +1,27 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Operation = require("./operation");
const KIND = "bin";
/**
* Binary operations
* @constructor Bin
* @memberOf module:php-parser
* @extends {Operation}
* @property {String} type
* @property {Expression} left
* @property {Expression} right
*/
module.exports = Operation.extends(
KIND,
function Bin(type, left, right, docs, location) {
Operation.apply(this, [KIND, docs, location]);
this.type = type;
this.left = left;
this.right = right;
},
);

24
node_modules/php-parser/src/ast/block.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* 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 = "block";
/**
* A block statement, i.e., a sequence of statements surrounded by braces.
* @constructor Block
* @memberOf module:php-parser
* @extends {Statement}
* @property {Node[]} children
*/
module.exports = Statement.extends(
KIND,
function Block(kind, children, docs, location) {
Statement.apply(this, [kind || KIND, docs, location]);
this.children = children.filter(Boolean);
},
);

23
node_modules/php-parser/src/ast/boolean.js generated vendored Executable file
View File

@@ -0,0 +1,23 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Literal = require("./literal");
const KIND = "boolean";
/**
* Defines a boolean value (true/false)
* @constructor Boolean
* @memberOf module:php-parser
* @extends {Literal}
* @property {boolean} value
*/
module.exports = Literal.extends(
KIND,
function Boolean(value, raw, docs, location) {
Literal.apply(this, [KIND, value, raw, docs, location]);
},
);

21
node_modules/php-parser/src/ast/break.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
/**
* 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 = "break";
/**
* A break statement
* @constructor Break
* @memberOf module:php-parser
* @extends {Statement}
* @property {Number|Null} level
*/
module.exports = Statement.extends(KIND, function Break(level, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.level = level;
});

21
node_modules/php-parser/src/ast/byref.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "byref";
/**
* Passing by Reference - so the function can modify the variable
* @constructor ByRef
* @memberOf module:php-parser
* @extends {Expression}
* @property {ExpressionStatement} what
*/
module.exports = Expression.extends(KIND, function ByRef(what, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.what = what;
});

26
node_modules/php-parser/src/ast/call.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "call";
/**
* Executes a call statement
* @constructor Call
* @memberOf module:php-parser
* @extends {Expression}
* @property {Identifier|Variable} what
* @property {Expression[]} arguments
*/
module.exports = Expression.extends(
KIND,
function Call(what, args, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.what = what;
this.arguments = args;
},
);

26
node_modules/php-parser/src/ast/case.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* 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 = "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;
},
);

28
node_modules/php-parser/src/ast/cast.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Operation = require("./operation");
const KIND = "cast";
/**
* Binary operations
* @constructor Cast
* @memberOf module:php-parser
* @extends {Operation}
* @property {String} type
* @property {String} raw
* @property {Expression} expr
*/
module.exports = Operation.extends(
KIND,
function Cast(type, raw, expr, docs, location) {
Operation.apply(this, [KIND, docs, location]);
this.type = type;
this.raw = raw;
this.expr = expr;
},
);

29
node_modules/php-parser/src/ast/catch.js generated vendored Executable file
View File

@@ -0,0 +1,29 @@
/**
* 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 = "catch";
/**
* Defines a catch statement
* @constructor Catch
* @memberOf module:php-parser
* @extends {Statement}
* @property {Name[]} what
* @property {Variable} variable
* @property {Block} body
* @see http://php.net/manual/en/language.exceptions.php
*/
module.exports = Statement.extends(
KIND,
function Catch(body, what, variable, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.body = body;
this.what = what;
this.variable = variable;
},
);

36
node_modules/php-parser/src/ast/class.js generated vendored Executable file
View File

@@ -0,0 +1,36 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Declaration = require("./declaration");
const KIND = "class";
/**
* A class definition
* @constructor Class
* @memberOf module:php-parser
* @extends {Declaration}
* @property {Identifier|null} extends
* @property {Identifier[]|null} implements
* @property {Declaration[]} body
* @property {boolean} isAnonymous
* @property {boolean} isAbstract
* @property {boolean} isFinal
* @property {boolean} isReadonly
* @property {AttrGroup[]} attrGroups
*/
module.exports = Declaration.extends(
KIND,
function Class(name, ext, impl, body, flags, docs, location) {
Declaration.apply(this, [KIND, name, docs, location]);
this.isAnonymous = name ? false : true;
this.extends = ext;
this.implements = impl;
this.body = body;
this.attrGroups = [];
this.parseFlags(flags);
},
);

71
node_modules/php-parser/src/ast/classconstant.js generated vendored Executable file
View File

@@ -0,0 +1,71 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const ConstantStatement = require("./constantstatement");
const KIND = "classconstant";
const IS_UNDEFINED = "";
const IS_PUBLIC = "public";
const IS_PROTECTED = "protected";
const IS_PRIVATE = "private";
/**
* Defines a class/interface/trait constant
* @constructor ClassConstant
* @memberOf module:php-parser
* @extends {ConstantStatement}
* @property {string} visibility
* @property {boolean} final
* @property {boolean} nullable
* @property {TypeReference|IntersectionType|UnionType|null} type
* @property {AttrGroup[]} attrGroups
*/
const ClassConstant = ConstantStatement.extends(
KIND,
function ClassConstant(
kind,
constants,
flags,
nullable,
type,
attrGroups,
docs,
location,
) {
ConstantStatement.apply(this, [kind || KIND, constants, docs, location]);
this.parseFlags(flags);
this.nullable = nullable;
this.type = type;
this.attrGroups = attrGroups;
},
);
/**
* Generic flags parser
* @function
* @name ClassConstant#parseFlags
* @memberOf module:php-parser
* @param {Array<number|null>} flags
* @return {void}
*/
ClassConstant.prototype.parseFlags = function (flags) {
if (flags[0] === -1) {
this.visibility = IS_UNDEFINED;
} else if (flags[0] === null) {
/* istanbul ignore next */
this.visibility = null;
} else if (flags[0] === 0) {
this.visibility = IS_PUBLIC;
} else if (flags[0] === 1) {
this.visibility = IS_PROTECTED;
} else if (flags[0] === 2) {
this.visibility = IS_PRIVATE;
}
this.final = flags[2] === 2;
};
module.exports = ClassConstant;

21
node_modules/php-parser/src/ast/clone.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "clone";
/**
* Defines a clone call
* @constructor Clone
* @memberOf module:php-parser
* @extends {Expression}
* @property {Expression} what
*/
module.exports = Expression.extends(KIND, function Clone(what, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.what = what;
});

47
node_modules/php-parser/src/ast/closure.js generated vendored Executable file
View File

@@ -0,0 +1,47 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "closure";
/**
* Defines a closure
* @constructor Closure
* @memberOf module:php-parser
* @extends {Expression}
* @property {Parameter[]} arguments
* @property {Variable[]} uses
* @property {Identifier} type
* @property {Boolean} byref
* @property {boolean} nullable
* @property {Block|null} body
* @property {boolean} isStatic
* @property {AttrGroup[]} attrGroups
*/
module.exports = Expression.extends(
KIND,
function Closure(
args,
byref,
uses,
type,
nullable,
isStatic,
docs,
location,
) {
Expression.apply(this, [KIND, docs, location]);
this.uses = uses;
this.arguments = args;
this.byref = byref;
this.type = type;
this.nullable = nullable;
this.isStatic = isStatic || false;
this.body = null;
this.attrGroups = [];
},
);

23
node_modules/php-parser/src/ast/comment.js generated vendored Executable file
View File

@@ -0,0 +1,23 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
/**
* Abstract documentation node (ComentLine or CommentBlock)
* @constructor Comment
* @memberOf module:php-parser
* @extends {Node}
* @property {String} value
*/
module.exports = Node.extends(
"comment",
function Comment(kind, value, docs, location) {
Node.apply(this, [kind, docs, location]);
this.value = value;
},
);

22
node_modules/php-parser/src/ast/commentblock.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Comment = require("./comment");
const KIND = "commentblock";
/**
* A comment block (multiline)
* @constructor CommentBlock
* @memberOf module:php-parser
* @extends {Comment}
*/
module.exports = Comment.extends(
KIND,
function CommentBlock(value, docs, location) {
Comment.apply(this, [KIND, value, docs, location]);
},
);

22
node_modules/php-parser/src/ast/commentline.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Comment = require("./comment");
const KIND = "commentline";
/**
* A single line comment
* @constructor CommentLine
* @memberOf module:php-parser
* @extends {Comment}
*/
module.exports = Comment.extends(
KIND,
function CommentLine(value, docs, location) {
Comment.apply(this, [KIND, value, docs, location]);
},
);

26
node_modules/php-parser/src/ast/constant.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "constant";
/**
* Defines a constant
* @constructor Constant
* @memberOf module:php-parser
* @extends {Node}
* @property {string} name
* @property {Node|string|number|boolean|null} value
*/
module.exports = Node.extends(
KIND,
function Constant(name, value, docs, location) {
Node.apply(this, [KIND, docs, location]);
this.name = name;
this.value = value;
},
);

24
node_modules/php-parser/src/ast/constantstatement.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* 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 = "constantstatement";
/**
* Declares a constants into the current scope
* @constructor ConstantStatement
* @memberOf module:php-parser
* @extends {Statement}
* @property {Constant[]} constants
*/
module.exports = Statement.extends(
KIND,
function ConstantStatement(kind, constants, docs, location) {
Statement.apply(this, [kind || KIND, docs, location]);
this.constants = constants;
},
);

24
node_modules/php-parser/src/ast/continue.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* 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 = "continue";
/**
* A continue statement
* @constructor Continue
* @memberOf module:php-parser
* @extends {Statement}
* @property {number|null} level
*/
module.exports = Statement.extends(
KIND,
function Continue(level, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.level = level;
},
);

60
node_modules/php-parser/src/ast/declaration.js generated vendored Executable file
View File

@@ -0,0 +1,60 @@
/**
* 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 = "declaration";
const IS_UNDEFINED = "";
const IS_PUBLIC = "public";
const IS_PROTECTED = "protected";
const IS_PRIVATE = "private";
/**
* A declaration statement (function, class, interface...)
* @constructor Declaration
* @memberOf module:php-parser
* @extends {Statement}
* @property {Identifier|string} name
*/
const Declaration = Statement.extends(
KIND,
function Declaration(kind, name, docs, location) {
Statement.apply(this, [kind || KIND, docs, location]);
this.name = name;
},
);
/**
* Generic flags parser
* @function
* @name Declaration#parseFlags
* @memberOf module:php-parser
* @param {Array<number|null>} flags
* @return {void}
*/
Declaration.prototype.parseFlags = function (flags) {
this.isAbstract = flags[2] === 1;
this.isFinal = flags[2] === 2;
this.isReadonly = flags[3] === 1;
if (this.kind !== "class") {
if (flags[0] === -1) {
this.visibility = IS_UNDEFINED;
} else if (flags[0] === null) {
/* istanbul ignore next */
this.visibility = null;
} else if (flags[0] === 0) {
this.visibility = IS_PUBLIC;
} else if (flags[0] === 1) {
this.visibility = IS_PROTECTED;
} else if (flags[0] === 2) {
this.visibility = IS_PRIVATE;
}
this.isStatic = flags[1] === 1;
}
};
module.exports = Declaration;

71
node_modules/php-parser/src/ast/declare.js generated vendored Executable file
View File

@@ -0,0 +1,71 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Block = require("./block");
const KIND = "declare";
/**
* The declare construct is used to set execution directives for a block of code
* @constructor Declare
* @memberOf module:php-parser
* @extends {Block}
* @property {DeclareDirective[]} directives
* @property {string} mode
* @see http://php.net/manual/en/control-structures.declare.php
*/
const Declare = Block.extends(
KIND,
function Declare(directives, body, mode, docs, location) {
Block.apply(this, [KIND, body, docs, location]);
this.directives = directives;
this.mode = mode;
},
);
/**
* The node is declared as a short tag syntax :
* ```php
* <?php
* declare(ticks=1):
* // some statements
* enddeclare;
* ```
* @constant {String} Declare#MODE_SHORT
* @memberOf module:php-parser
*/
Declare.MODE_SHORT = "short";
/**
* The node is declared bracket enclosed code :
* ```php
* <?php
* declare(ticks=1) {
* // some statements
* }
* ```
* @constant {String} Declare#MODE_BLOCK
* @memberOf module:php-parser
*/
Declare.MODE_BLOCK = "block";
/**
* The node is declared as a simple statement. In order to make things simpler
* children of the node are automatically collected until the next
* declare statement.
* ```php
* <?php
* declare(ticks=1);
* // some statements
* declare(ticks=2);
* // some statements
* ```
* @constant {String} Declare#MODE_NONE
* @memberOf module:php-parser
*/
Declare.MODE_NONE = "none";
module.exports = Declare;

26
node_modules/php-parser/src/ast/declaredirective.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "declaredirective";
/**
* Defines a constant
* @constructor DeclareDirective
* @memberOf module:php-parser
* @extends {Node}
* @property {Identifier} key
* @property {Node|string|number|boolean|null} value
*/
module.exports = Node.extends(
KIND,
function DeclareDirective(key, value, docs, location) {
Node.apply(this, [KIND, docs, location]);
this.key = key;
this.value = value;
},
);

26
node_modules/php-parser/src/ast/do.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* 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 = "do";
/**
* Defines a do/while statement
* @constructor Do
* @memberOf module:php-parser
* @extends {Statement}
* @property {Expression} test
* @property {Block | null} body
*/
module.exports = Statement.extends(
KIND,
function Do(test, body, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.test = test;
this.body = body;
},
);

26
node_modules/php-parser/src/ast/echo.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* 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 = "echo";
/**
* Defines system based call
* @constructor Echo
* @memberOf module:php-parser
* @property {boolean} shortForm
* @property {Expression[]} expressions
* @extends {Statement}
*/
module.exports = Statement.extends(
KIND,
function Echo(expressions, shortForm, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.shortForm = shortForm;
this.expressions = expressions;
},
);

23
node_modules/php-parser/src/ast/empty.js generated vendored Executable file
View File

@@ -0,0 +1,23 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "empty";
/**
* Defines an empty check call
* @constructor Empty
* @memberOf module:php-parser
* @extends {Expression}
*/
module.exports = Expression.extends(
KIND,
function Empty(expression, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.expression = expression;
},
);

75
node_modules/php-parser/src/ast/encapsed.js generated vendored Executable file
View File

@@ -0,0 +1,75 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Literal = require("./literal");
const KIND = "encapsed";
/**
* Defines an encapsed string (contains expressions)
* @constructor Encapsed
* @memberOf module:php-parser
* @extends {Literal}
* @property {String} type - Defines the type of encapsed string (shell, heredoc, string)
* @property {String|Null} label - The heredoc label, defined only when the type is heredoc
* @property {EncapsedPart[]} value
*/
const Encapsed = Literal.extends(
KIND,
function Encapsed(value, raw, type, docs, location) {
Literal.apply(this, [KIND, value, raw, docs, location]);
this.type = type;
},
);
/**
* The node is a double quote string :
* ```php
* <?php
* echo "hello $world";
* ```
* @constant {String} Encapsed#TYPE_STRING - `string`
* @memberOf module:php-parser
*/
Encapsed.TYPE_STRING = "string";
/**
* The node is a shell execute string :
* ```php
* <?php
* echo `ls -larth $path`;
* ```
* @constant {String} Encapsed#TYPE_SHELL - `shell`
* @memberOf module:php-parser
*/
Encapsed.TYPE_SHELL = "shell";
/**
* The node is a shell execute string :
* ```php
* <?php
* echo <<<STR
* Hello $world
* STR
* ;
* ```
* @constant {String} Encapsed#TYPE_HEREDOC - `heredoc`
* @memberOf module:php-parser
*/
Encapsed.TYPE_HEREDOC = "heredoc";
/**
* The node contains a list of constref / variables / expr :
* ```php
* <?php
* echo $foo->bar_$baz;
* ```
* @constant {String} Encapsed#TYPE_OFFSET - `offset`
* @memberOf module:php-parser
*/
Encapsed.TYPE_OFFSET = "offset";
module.exports = Encapsed;

28
node_modules/php-parser/src/ast/encapsedpart.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "encapsedpart";
/**
* Part of `Encapsed` node
* @constructor EncapsedPart
* @memberOf module:php-parser
* @extends {Expression}
* @property {Expression} expression
* @property {String} syntax
* @property {Boolean} curly
*/
module.exports = Expression.extends(
KIND,
function EncapsedPart(expression, syntax, curly, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.expression = expression;
this.syntax = syntax;
this.curly = curly;
},
);

30
node_modules/php-parser/src/ast/entry.js generated vendored Executable file
View File

@@ -0,0 +1,30 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "entry";
/**
* An array entry - see [Array](#array)
* @memberOf module:php-parser
* @constructor Entry
* @extends {Expression}
* @property {Node|null} key The entry key/offset
* @property {Node} value The entry value
* @property {Boolean} byRef By reference
* @property {Boolean} unpack Argument unpacking
*/
module.exports = Expression.extends(
KIND,
function Entry(key, value, byRef, unpack, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.key = key;
this.value = value;
this.byRef = byRef;
this.unpack = unpack;
},
);

30
node_modules/php-parser/src/ast/enum.js generated vendored Executable file
View File

@@ -0,0 +1,30 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Declaration = require("./declaration");
const KIND = "enum";
/**
* A enum definition
* @constructor Enum
* @memberOf module:php-parser
* @extends {Declaration}
* @property {Identifier|null} valueType
* @property {Identifier[]} implements
* @property {Declaration[]} body
* @property {AttrGroup[]} attrGroups
*/
module.exports = Declaration.extends(
KIND,
function Enum(name, valueType, impl, body, docs, location) {
Declaration.apply(this, [KIND, name, docs, location]);
this.valueType = valueType;
this.implements = impl;
this.body = body;
this.attrGroups = [];
},
);

26
node_modules/php-parser/src/ast/enumcase.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "enumcase";
/**
* Declares a cases into the current scope
* @constructor EnumCase
* @memberOf module:php-parser
* @extends {Node}
* @property {string} name
* @property {string|number|null} value
*/
module.exports = Node.extends(
KIND,
function EnumCase(name, value, docs, location) {
Node.apply(this, [KIND, docs, location]);
this.name = name;
this.value = value;
},
);

30
node_modules/php-parser/src/ast/error.js generated vendored Executable file
View File

@@ -0,0 +1,30 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "error";
/**
* Defines an error node (used only on silentMode)
* @constructor Error
* @memberOf module:php-parser
* @extends {Node}
* @property {string} message
* @property {number} line
* @property {number|string} token
* @property {string|array} expected
*/
module.exports = Node.extends(
KIND,
function Error(message, token, line, expected, docs, location) {
Node.apply(this, [KIND, docs, location]);
this.message = message;
this.token = token;
this.line = line;
this.expected = expected;
},
);

24
node_modules/php-parser/src/ast/eval.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "eval";
/**
* Defines an eval statement
* @constructor Eval
* @memberOf module:php-parser
* @extends {Expression}
* @property {Node} source
*/
module.exports = Expression.extends(
KIND,
function Eval(source, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.source = source;
},
);

26
node_modules/php-parser/src/ast/exit.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "exit";
/**
* Defines an exit / die call
* @constructor Exit
* @memberOf module:php-parser
* @extends {Expression}
* @property {Node|null} expression
* @property {boolean} useDie
*/
module.exports = Expression.extends(
KIND,
function Exit(expression, useDie, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.expression = expression;
this.useDie = useDie;
},
);

20
node_modules/php-parser/src/ast/expression.js generated vendored Executable file
View File

@@ -0,0 +1,20 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "expression";
/**
* Any expression node. Since the left-hand side of an assignment may
* be any expression in general, an expression can also be a pattern.
* @constructor Expression
* @memberOf module:php-parser
* @extends {Node}
*/
module.exports = Node.extends(KIND, function Expression(kind, docs, location) {
Node.apply(this, [kind || KIND, docs, location]);
});

24
node_modules/php-parser/src/ast/expressionstatement.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* 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 = "expressionstatement";
/**
* Defines an expression based statement
* @constructor ExpressionStatement
* @memberOf module:php-parser
* @extends {Statement}
* @property {Expression} expression
*/
module.exports = Statement.extends(
KIND,
function ExpressionStatement(expr, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.expression = expr;
},
);

33
node_modules/php-parser/src/ast/for.js generated vendored Executable file
View File

@@ -0,0 +1,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 = "for";
/**
* Defines a for iterator
* @constructor For
* @memberOf module:php-parser
* @extends {Statement}
* @property {Expression[]} init
* @property {Expression[]} test
* @property {Expression[]} increment
* @property {Block | null} body
* @property {boolean} shortForm
* @see http://php.net/manual/en/control-structures.for.php
*/
module.exports = Statement.extends(
KIND,
function For(init, test, increment, body, shortForm, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.init = init;
this.test = test;
this.increment = increment;
this.shortForm = shortForm;
this.body = body;
},
);

33
node_modules/php-parser/src/ast/foreach.js generated vendored Executable file
View File

@@ -0,0 +1,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 = "foreach";
/**
* Defines a foreach iterator
* @constructor Foreach
* @memberOf module:php-parser
* @extends {Statement}
* @property {Expression} source
* @property {Expression|null} key
* @property {Expression} value
* @property {Block | null} body
* @property {boolean} shortForm
* @see http://php.net/manual/en/control-structures.foreach.php
*/
module.exports = Statement.extends(
KIND,
function Foreach(source, key, value, body, shortForm, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.source = source;
this.key = key;
this.value = value;
this.shortForm = shortForm;
this.body = body;
},
);

34
node_modules/php-parser/src/ast/function.js generated vendored Executable file
View File

@@ -0,0 +1,34 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Declaration = require("./declaration");
const KIND = "function";
/**
* Defines a classic function
* @constructor Function
* @memberOf module:php-parser
* @extends {Declaration}
* @property {Parameter[]} arguments
* @property {Identifier} type
* @property {boolean} byref
* @property {boolean} nullable
* @property {Block|null} body
* @property {AttrGroup[]} attrGroups
*/
module.exports = Declaration.extends(
KIND,
function _Function(name, args, byref, type, nullable, docs, location) {
Declaration.apply(this, [KIND, name, docs, location]);
this.arguments = args;
this.byref = byref;
this.type = type;
this.nullable = nullable;
this.body = null;
this.attrGroups = [];
},
);

24
node_modules/php-parser/src/ast/global.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* 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 = "global";
/**
* Imports a variable from the global scope
* @constructor Global
* @memberOf module:php-parser
* @extends {Statement}
* @property {Variable[]} items
*/
module.exports = Statement.extends(
KIND,
function Global(items, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.items = items;
},
);

22
node_modules/php-parser/src/ast/goto.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* 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 = "goto";
/**
* Defines goto statement
* @constructor Goto
* @memberOf module:php-parser
* @extends {Statement}
* @property {string} label
* @see {Label}
*/
module.exports = Statement.extends(KIND, function Goto(label, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.label = label;
});

22
node_modules/php-parser/src/ast/halt.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* 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 = "halt";
/**
* Halts the compiler execution
* @constructor Halt
* @memberOf module:php-parser
* @extends {Statement}
* @property {String} after - String after the halt statement
* @see http://php.net/manual/en/function.halt-compiler.php
*/
module.exports = Statement.extends(KIND, function Halt(after, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.after = after;
});

26
node_modules/php-parser/src/ast/identifier.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "identifier";
/**
* Defines an identifier node
* @constructor Identifier
* @memberOf module:php-parser
* @extends {Node}
* @property {string} name
*/
const Identifier = Node.extends(
KIND,
function Identifier(name, docs, location) {
Node.apply(this, [KIND, docs, location]);
this.name = name;
},
);
module.exports = Identifier;

30
node_modules/php-parser/src/ast/if.js generated vendored Executable file
View File

@@ -0,0 +1,30 @@
/**
* 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
* @memberOf module:php-parser
* @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;
},
);

28
node_modules/php-parser/src/ast/include.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "include";
/**
* Defines system include call
* @constructor Include
* @memberOf module:php-parser
* @extends {Expression}
* @property {Node} target
* @property {boolean} once
* @property {boolean} require
*/
module.exports = Expression.extends(
KIND,
function Include(once, require, target, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.once = once;
this.require = require;
this.target = target;
},
);

23
node_modules/php-parser/src/ast/inline.js generated vendored Executable file
View File

@@ -0,0 +1,23 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Literal = require("./literal");
const KIND = "inline";
/**
* Defines inline html output (treated as echo output)
* @constructor Inline
* @memberOf module:php-parser
* @extends {Literal}
* @property {string} value
*/
module.exports = Literal.extends(
KIND,
function Inline(value, raw, docs, location) {
Literal.apply(this, [KIND, value, raw, docs, location]);
},
);

28
node_modules/php-parser/src/ast/interface.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Declaration = require("./declaration");
const KIND = "interface";
/**
* An interface definition
* @constructor Interface
* @memberOf module:php-parser
* @extends {Declaration}
* @property {Identifier[]} extends
* @property {Declaration[]} body
* @property {AttrGroup[]} attrGroups
*/
module.exports = Declaration.extends(
KIND,
function Interface(name, ext, body, attrGroups, docs, location) {
Declaration.apply(this, [KIND, name, docs, location]);
this.extends = ext;
this.body = body;
this.attrGroups = attrGroups;
},
);

24
node_modules/php-parser/src/ast/intersectiontype.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Declaration = require("./declaration");
const KIND = "intersectiontype";
/**
* A union of types
* @memberOf module:php-parser
* @constructor IntersectionType
* @extends {Declaration}
* @property {TypeReference[]} types
*/
module.exports = Declaration.extends(
KIND,
function IntersectionType(types, docs, location) {
Declaration.apply(this, [KIND, null, docs, location]);
this.types = types;
},
);

23
node_modules/php-parser/src/ast/isset.js generated vendored Executable file
View File

@@ -0,0 +1,23 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "isset";
/**
* Defines an isset call
* @constructor Isset
* @memberOf module:php-parser
* @extends {Expression}
*/
module.exports = Expression.extends(
KIND,
function Isset(variables, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.variables = variables;
},
);

21
node_modules/php-parser/src/ast/label.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
/**
* 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 = "label";
/**
* A label statement (referenced by goto)
* @constructor Label
* @memberOf module:php-parser
* @extends {Statement}
* @property {String} name
*/
module.exports = Statement.extends(KIND, function Label(name, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.name = name;
});

26
node_modules/php-parser/src/ast/list.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "list";
/**
* Defines list assignment
* @constructor List
* @memberOf module:php-parser
* @extends {Expression}
* @property {boolean} shortForm
* @property {Entry[]} items
*/
module.exports = Expression.extends(
KIND,
function List(items, shortForm, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.items = items;
this.shortForm = shortForm;
},
);

28
node_modules/php-parser/src/ast/literal.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "literal";
/**
* Defines an array structure
* @constructor Literal
* @memberOf module:php-parser
* @extends {Expression}
* @property {string} raw
* @property {EncapsedPart[]|Node|string|number|boolean|null} value
*/
module.exports = Expression.extends(
KIND,
function Literal(kind, value, raw, docs, location) {
Expression.apply(this, [kind || KIND, docs, location]);
this.value = value;
if (raw) {
this.raw = raw;
}
},
);

22
node_modules/php-parser/src/ast/location.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
/**
* Defines the location of the node (with it's source contents as string)
* @constructor Location
* @memberOf module:php-parser
* @property {string|null} source
* @property {Position} start
* @property {Position} end
*/
const Location = function (source, start, end) {
this.source = source;
this.start = start;
this.end = end;
};
module.exports = Location;

26
node_modules/php-parser/src/ast/lookup.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expr = require("./expression");
const KIND = "lookup";
/**
* Lookup on an offset in the specified object
* @constructor Lookup
* @memberOf module:php-parser
* @extends {Expression}
* @property {Expression} what
* @property {Expression} offset
*/
module.exports = Expr.extends(
KIND,
function Lookup(kind, what, offset, docs, location) {
Expr.apply(this, [kind || KIND, docs, location]);
this.what = what;
this.offset = offset;
},
);

22
node_modules/php-parser/src/ast/magic.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Literal = require("./literal");
const KIND = "magic";
/**
* Defines magic constant
* @constructor Magic
* @memberOf module:php-parser
* @extends {Literal}
*/
module.exports = Literal.extends(
KIND,
function Magic(value, raw, docs, location) {
Literal.apply(this, [KIND, value, raw, docs, location]);
},
);

26
node_modules/php-parser/src/ast/match.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "match";
/**
* Defines a match expression
* @memberOf module:php-parser
* @constructor Match
* @extends {Expression}
* @property {Expression} cond Condition expression to match against
* @property {MatchArm[]} arms Arms for comparison
*/
module.exports = Expression.extends(
KIND,
function Match(cond, arms, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.cond = cond;
this.arms = arms;
},
);

26
node_modules/php-parser/src/ast/matcharm.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "matcharm";
/**
* An array entry - see [Array](#array)
* @memberOf module:php-parser
* @constructor MatchArm
* @extends {Expression}
* @property {Expression[]|null} conds The match condition expression list - null indicates default arm
* @property {Expression} body The return value expression
*/
module.exports = Expression.extends(
KIND,
function MatchArm(conds, body, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.conds = conds;
this.body = body;
},
);

24
node_modules/php-parser/src/ast/method.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Function_ = require("./function");
const KIND = "method";
/**
* Defines a class/interface/trait method
* @constructor Method
* @memberOf module:php-parser
* @extends {Function}
* @property {boolean} isAbstract
* @property {boolean} isFinal
* @property {boolean} isStatic
* @property {string} visibility
*/
module.exports = Function_.extends(KIND, function Method() {
Function_.apply(this, arguments);
this.kind = KIND;
});

55
node_modules/php-parser/src/ast/name.js generated vendored Executable file
View File

@@ -0,0 +1,55 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Reference = require("./reference");
const KIND = "name";
/**
* Defines a class reference node
* @constructor Name
* @memberOf module:php-parser
* @extends {Reference}
* @property {string} name
* @property {string} resolution
*/
const Name = Reference.extends(
KIND,
function Name(name, resolution, docs, location) {
Reference.apply(this, [KIND, docs, location]);
this.name = name.replace(/\\$/, "");
this.resolution = resolution;
},
);
/**
* This is an identifier without a namespace separator, such as Foo
* @constant {String} Name#UNQUALIFIED_NAME
* @memberOf module:php-parser
*/
Name.UNQUALIFIED_NAME = "uqn";
/**
* This is an identifier with a namespace separator, such as Foo\Bar
* @constant {String} Name#QUALIFIED_NAME
* @memberOf module:php-parser
*/
Name.QUALIFIED_NAME = "qn";
/**
* This is an identifier with a namespace separator that begins with
* a namespace separator, such as \Foo\Bar. The namespace \Foo is also
* a fully qualified name.
* @constant {String} Name#FULL_QUALIFIED_NAME
* @memberOf module:php-parser
*/
Name.FULL_QUALIFIED_NAME = "fqn";
/**
* This is an identifier starting with namespace, such as namespace\Foo\Bar.
* @constant {String} Name#RELATIVE_NAME
* @memberOf module:php-parser
*/
Name.RELATIVE_NAME = "rn";
module.exports = Name;

27
node_modules/php-parser/src/ast/namedargument.js generated vendored Executable file
View File

@@ -0,0 +1,27 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "namedargument";
/**
* Named arguments.
* @memberOf module:php-parser
* @constructor namedargument
* @extends {Expression}
* @property {String} name
* @property {Expression} value
* @see https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments
*/
module.exports = Expression.extends(
KIND,
function namedargument(name, value, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.name = name;
this.value = value;
},
);

26
node_modules/php-parser/src/ast/namespace.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Block = require("./block");
const KIND = "namespace";
/**
* The main program node
* @constructor Namespace
* @memberOf module:php-parser
* @extends {Block}
* @property {string} name
* @property {boolean} withBrackets
*/
module.exports = Block.extends(
KIND,
function Namespace(name, children, withBrackets, docs, location) {
Block.apply(this, [KIND, children, docs, location]);
this.name = name;
this.withBrackets = withBrackets || false;
},
);

26
node_modules/php-parser/src/ast/new.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "new";
/**
* Creates a new instance of the specified class
* @constructor New
* @memberOf module:php-parser
* @extends {Expression}
* @property {Identifier|Variable|Class} what
* @property {Variable[]} arguments
*/
module.exports = Expression.extends(
KIND,
function New(what, args, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.what = what;
this.arguments = args;
},
);

111
node_modules/php-parser/src/ast/node.js generated vendored Executable file
View File

@@ -0,0 +1,111 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
/**
* A generic AST node
* @constructor Node
* @memberOf module:php-parser
* @property {Location|null} loc
* @property {CommentBlock[]|Comment[]|null} leadingComments
* @property {CommentBlock[]|Comment[]|null} trailingComments
* @property {string} kind
*/
const Node = function Node(kind, docs, location) {
this.kind = kind;
if (docs) {
this.leadingComments = docs;
}
if (location) {
this.loc = location;
}
};
/**
* Attach comments to current node
* @function Node#setTrailingComments
* @memberOf module:php-parser
* @param {*} docs
*/
Node.prototype.setTrailingComments = function (docs) {
this.trailingComments = docs;
};
/**
* Destroying an unused node
* @function Node#destroy
* @memberOf module:php-parser
*/
Node.prototype.destroy = function (node) {
if (!node) {
/* istanbul ignore next */
throw new Error(
"Node already initialized, you must swap with another node",
);
}
if (this.leadingComments) {
if (node.leadingComments) {
node.leadingComments = Array.concat(
this.leadingComments,
node.leadingComments,
);
} else {
node.leadingComments = this.leadingComments;
}
}
if (this.trailingComments) {
if (node.trailingComments) {
node.trailingComments = Array.concat(
this.trailingComments,
node.trailingComments,
);
} else {
node.trailingComments = this.trailingComments;
}
}
return node;
};
/**
* Includes current token position of the parser
* @function Node#includeToken
* @memberOf module:php-parser
* @param {*} parser
*/
Node.prototype.includeToken = function (parser) {
if (this.loc) {
if (this.loc.end) {
this.loc.end.line = parser.lexer.yylloc.last_line;
this.loc.end.column = parser.lexer.yylloc.last_column;
this.loc.end.offset = parser.lexer.offset;
}
if (parser.ast.withSource) {
this.loc.source = parser.lexer._input.substring(
this.loc.start.offset,
parser.lexer.offset,
);
}
}
return this;
};
/**
* Helper for extending the Node class
* @function Node.extends
* @memberOf module:php-parser
* @param {string} type
* @param {Function} constructor
* @return {Function}
*/
Node.extends = function (type, constructor) {
constructor.prototype = Object.create(this.prototype);
constructor.extends = this.extends;
constructor.prototype.constructor = constructor;
constructor.kind = type;
return constructor;
};
module.exports = Node;

20
node_modules/php-parser/src/ast/noop.js generated vendored Executable file
View File

@@ -0,0 +1,20 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "noop";
/**
* Ignore this node, it implies a no operation block, for example :
* [$foo, $bar, /* here a noop node * /]
* @constructor Noop
* @memberOf module:php-parser
* @extends {Node}
*/
module.exports = Node.extends(KIND, function Noop(docs, location) {
Node.apply(this, [KIND, docs, location]);
});

26
node_modules/php-parser/src/ast/nowdoc.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Literal = require("./literal");
const KIND = "nowdoc";
/**
* Defines a nowdoc string
* @constructor NowDoc
* @memberOf module:php-parser
* @extends {Literal}
* @property {string} label
* @property {string} raw
* @property {string} value
*/
module.exports = Literal.extends(
KIND,
function Nowdoc(value, raw, label, docs, location) {
Literal.apply(this, [KIND, value, raw, docs, location]);
this.label = label;
},
);

20
node_modules/php-parser/src/ast/nullkeyword.js generated vendored Executable file
View File

@@ -0,0 +1,20 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "nullkeyword";
/**
* Represents the null keyword
* @constructor NullKeyword
* @memberOf module:php-parser
* @extends {Node}
*/
module.exports = Node.extends(KIND, function NullKeyword(raw, docs, location) {
Node.apply(this, [KIND, docs, location]);
this.raw = raw;
});

22
node_modules/php-parser/src/ast/nullsafepropertylookup.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Lookup = require("./lookup");
const KIND = "nullsafepropertylookup";
/**
* Lookup to an object property
* @memberOf module:php-parser
* @constructor NullSafePropertyLookup
* @extends {Lookup}
*/
module.exports = Lookup.extends(
KIND,
function NullSafePropertyLookup(what, offset, docs, location) {
Lookup.apply(this, [KIND, what, offset, docs, location]);
},
);

23
node_modules/php-parser/src/ast/number.js generated vendored Executable file
View File

@@ -0,0 +1,23 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Literal = require("./literal");
const KIND = "number";
/**
* Defines a numeric value
* @constructor Number
* @memberOf module:php-parser
* @extends {Literal}
* @property {number} value
*/
module.exports = Literal.extends(
KIND,
function Number(value, raw, docs, location) {
Literal.apply(this, [KIND, value, raw, docs, location]);
},
);

22
node_modules/php-parser/src/ast/offsetlookup.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Lookup = require("./lookup");
const KIND = "offsetlookup";
/**
* Lookup on an offset in an array
* @constructor OffsetLookup
* @memberOf module:php-parser
* @extends {Lookup}
*/
module.exports = Lookup.extends(
KIND,
function OffsetLookup(what, offset, docs, location) {
Lookup.apply(this, [KIND, what, offset, docs, location]);
},
);

19
node_modules/php-parser/src/ast/operation.js generated vendored Executable file
View File

@@ -0,0 +1,19 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expr = require("./expression");
const KIND = "operation";
/**
* Defines binary operations
* @constructor Operation
* @memberOf module:php-parser
* @extends {Expression}
*/
module.exports = Expr.extends(KIND, function Operation(kind, docs, location) {
Expr.apply(this, [kind || KIND, docs, location]);
});

61
node_modules/php-parser/src/ast/parameter.js generated vendored Executable file
View File

@@ -0,0 +1,61 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Declaration = require("./declaration");
const KIND = "parameter";
/**
* @memberOf module:php-parser
* @typedef {1} MODIFIER_PUBLIC
**/
/**
* @memberOf module:php-parser
* @typedef {2} MODIFIER_PROTECTED
**/
/**
* @memberOf module:php-parser
* @typedef {4} MODIFIER_PRIVATE
**/
/**
* Defines a function parameter
* @constructor Parameter
* @memberOf module:php-parser
* @extends {Declaration}
* @property {Identifier|null} type
* @property {Node|null} value
* @property {boolean} byref
* @property {boolean} variadic
* @property {boolean} readonly
* @property {boolean} nullable
* @property {AttrGroup[]} attrGroups
* @property {MODIFIER_PUBLIC|MODIFIER_PROTECTED|MODIFIER_PRIVATE} flags
*/
module.exports = Declaration.extends(
KIND,
function Parameter(
name,
type,
value,
isRef,
isVariadic,
readonly,
nullable,
flags,
docs,
location,
) {
Declaration.apply(this, [KIND, name, docs, location]);
this.value = value;
this.type = type;
this.byref = isRef;
this.variadic = isVariadic;
this.readonly = readonly;
this.nullable = nullable;
this.flags = flags || 0;
this.attrGroups = [];
},
);

24
node_modules/php-parser/src/ast/parentreference.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Reference = require("./reference");
const KIND = "parentreference";
/**
* Defines a class reference node
* @constructor ParentReference
* @memberOf module:php-parser
* @extends {Reference}
*/
const ParentReference = Reference.extends(
KIND,
function ParentReference(raw, docs, location) {
Reference.apply(this, [KIND, docs, location]);
this.raw = raw;
},
);
module.exports = ParentReference;

22
node_modules/php-parser/src/ast/position.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
/**
* Each Position object consists of a line number (1-indexed) and a column number (0-indexed):
* @constructor Position
* @memberOf module:php-parser
* @property {number} line
* @property {number} column
* @property {number} offset
*/
const Position = function (line, column, offset) {
this.line = line;
this.column = column;
this.offset = offset;
};
module.exports = Position;

26
node_modules/php-parser/src/ast/post.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Operation = require("./operation");
const KIND = "post";
/**
* Defines a post operation `$i++` or `$i--`
* @constructor Post
* @memberOf module:php-parser
* @extends {Operation}
* @property {String} type
* @property {Variable} what
*/
module.exports = Operation.extends(
KIND,
function Post(type, what, docs, location) {
Operation.apply(this, [KIND, docs, location]);
this.type = type;
this.what = what;
},
);

26
node_modules/php-parser/src/ast/pre.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Operation = require("./operation");
const KIND = "pre";
/**
* Defines a pre operation `++$i` or `--$i`
* @constructor Pre
* @memberOf module:php-parser
* @extends {Operation}
* @property {String} type
* @property {Variable} what
*/
module.exports = Operation.extends(
KIND,
function Pre(type, what, docs, location) {
Operation.apply(this, [KIND, docs, location]);
this.type = type;
this.what = what;
},
);

23
node_modules/php-parser/src/ast/print.js generated vendored Executable file
View File

@@ -0,0 +1,23 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "print";
/**
* Outputs
* @constructor Print
* @memberOf module:php-parser
* @extends {Expression}
*/
module.exports = Expression.extends(
KIND,
function Print(expression, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.expression = expression;
},
);

32
node_modules/php-parser/src/ast/program.js generated vendored Executable file
View File

@@ -0,0 +1,32 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Block = require("./block");
const KIND = "program";
/**
* The main program node
* @constructor Program
* @memberOf module:php-parser
* @extends {Block}
* @property {Error[]} errors
* @property {Comment[]|null} comments
* @property {String[]|null} tokens
*/
module.exports = Block.extends(
KIND,
function Program(children, errors, comments, tokens, docs, location) {
Block.apply(this, [KIND, children, docs, location]);
this.errors = errors;
if (comments) {
this.comments = comments;
}
if (tokens) {
this.tokens = tokens;
}
},
);

43
node_modules/php-parser/src/ast/property.js generated vendored Executable file
View File

@@ -0,0 +1,43 @@
/**
* 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 = "property";
/**
* Defines a class property
* @constructor Property
* @memberOf module:php-parser
* @extends {Statement}
* @property {string} name
* @property {Node|null} value
* @property {boolean} readonly
* @property {boolean} nullable
* @property {Identifier|Array<Identifier>|null} type
* @property {AttrGroup[]} attrGroups
*/
module.exports = Statement.extends(
KIND,
function Property(
name,
value,
readonly,
nullable,
type,
attrGroups,
docs,
location,
) {
Statement.apply(this, [KIND, docs, location]);
this.name = name;
this.value = value;
this.readonly = readonly;
this.nullable = nullable;
this.type = type;
this.attrGroups = attrGroups;
},
);

22
node_modules/php-parser/src/ast/propertylookup.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Lookup = require("./lookup");
const KIND = "propertylookup";
/**
* Lookup to an object property
* @memberOf module:php-parser
* @constructor PropertyLookup
* @extends {Lookup}
*/
module.exports = Lookup.extends(
KIND,
function PropertyLookup(what, offset, docs, location) {
Lookup.apply(this, [KIND, what, offset, docs, location]);
},
);

57
node_modules/php-parser/src/ast/propertystatement.js generated vendored Executable file
View File

@@ -0,0 +1,57 @@
/**
* 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 = "propertystatement";
const IS_UNDEFINED = "";
const IS_PUBLIC = "public";
const IS_PROTECTED = "protected";
const IS_PRIVATE = "private";
/**
* Declares a properties into the current scope
* @constructor PropertyStatement
* @memberOf module:php-parser
* @extends {Statement}
* @property {Property[]} properties
* @property {string|null} visibility
* @property {boolean} isStatic
*/
const PropertyStatement = Statement.extends(
KIND,
function PropertyStatement(kind, properties, flags, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.properties = properties;
this.parseFlags(flags);
},
);
/**
* Generic flags parser
* @function PropertyStatement#parseFlags
* @memberOf module:php-parser
* @param {Array<number|null>} flags
* @return {void}
*/
PropertyStatement.prototype.parseFlags = function (flags) {
if (flags[0] === -1) {
this.visibility = IS_UNDEFINED;
} else if (flags[0] === null) {
this.visibility = null;
} else if (flags[0] === 0) {
this.visibility = IS_PUBLIC;
} else if (flags[0] === 1) {
this.visibility = IS_PROTECTED;
} else if (flags[0] === 2) {
this.visibility = IS_PRIVATE;
}
this.isStatic = flags[1] === 1;
};
module.exports = PropertyStatement;

21
node_modules/php-parser/src/ast/reference.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "reference";
/**
* Defines a reference node
* @constructor Reference
* @memberOf module:php-parser
* @extends {Node}
*/
const Reference = Node.extends(KIND, function Reference(kind, docs, location) {
Node.apply(this, [kind || KIND, docs, location]);
});
module.exports = Reference;

28
node_modules/php-parser/src/ast/retif.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "retif";
/**
* Defines a short if statement that returns a value
* @constructor RetIf
* @memberOf module:php-parser
* @extends {Expression}
* @property {Expression} test
* @property {Expression} trueExpr
* @property {Expression} falseExpr
*/
module.exports = Expression.extends(
KIND,
function RetIf(test, trueExpr, falseExpr, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.test = test;
this.trueExpr = trueExpr;
this.falseExpr = falseExpr;
},
);

21
node_modules/php-parser/src/ast/return.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
/**
* 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 = "return";
/**
* A continue statement
* @constructor Return
* @memberOf module:php-parser
* @extends {Statement}
* @property {Expression|null} expr
*/
module.exports = Statement.extends(KIND, function Return(expr, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.expr = expr;
});

24
node_modules/php-parser/src/ast/selfreference.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Reference = require("./reference");
const KIND = "selfreference";
/**
* Defines a class reference node
* @constructor SelfReference
* @memberOf module:php-parser
* @extends {Reference}
*/
const SelfReference = Reference.extends(
KIND,
function SelfReference(raw, docs, location) {
Reference.apply(this, [KIND, docs, location]);
this.raw = raw;
},
);
module.exports = SelfReference;

24
node_modules/php-parser/src/ast/silent.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Expression = require("./expression");
const KIND = "silent";
/**
* Avoids to show/log warnings & notices from the inner expression
* @constructor Silent
* @memberOf module:php-parser
* @extends {Expression}
* @property {Expression} expr
*/
module.exports = Expression.extends(
KIND,
function Silent(expr, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.expr = expr;
},
);

19
node_modules/php-parser/src/ast/statement.js generated vendored Executable file
View File

@@ -0,0 +1,19 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "statement";
/**
* Any statement.
* @constructor Statement
* @memberOf module:php-parser
* @extends {Node}
*/
module.exports = Node.extends(KIND, function Statement(kind, docs, location) {
Node.apply(this, [kind || KIND, docs, location]);
});

24
node_modules/php-parser/src/ast/static.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* 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 = "static";
/**
* Declares a static variable into the current scope
* @constructor Static
* @memberOf module:php-parser
* @extends {Statement}
* @property {StaticVariable[]} variables
*/
module.exports = Statement.extends(
KIND,
function Static(variables, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.variables = variables;
},
);

22
node_modules/php-parser/src/ast/staticlookup.js generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Lookup = require("./lookup");
const KIND = "staticlookup";
/**
* Lookup to a static property
* @constructor StaticLookup
* @memberOf module:php-parser
* @extends {Lookup}
*/
module.exports = Lookup.extends(
KIND,
function StaticLookup(what, offset, docs, location) {
Lookup.apply(this, [KIND, what, offset, docs, location]);
},
);

24
node_modules/php-parser/src/ast/staticreference.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Reference = require("./reference");
const KIND = "staticreference";
/**
* Defines a class reference node
* @constructor StaticReference
* @memberOf module:php-parser
* @extends {Reference}
*/
const StaticReference = Reference.extends(
KIND,
function StaticReference(raw, docs, location) {
Reference.apply(this, [KIND, docs, location]);
this.raw = raw;
},
);
module.exports = StaticReference;

26
node_modules/php-parser/src/ast/staticvariable.js generated vendored Executable file
View File

@@ -0,0 +1,26 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Node = require("./node");
const KIND = "staticvariable";
/**
* Defines a constant
* @constructor StaticVariable
* @memberOf module:php-parser
* @extends {Node}
* @property {Variable} variable
* @property {Node|string|number|boolean|null} defaultValue
*/
module.exports = Node.extends(
KIND,
function StaticVariable(variable, defaultValue, docs, location) {
Node.apply(this, [KIND, docs, location]);
this.variable = variable;
this.defaultValue = defaultValue;
},
);

28
node_modules/php-parser/src/ast/string.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Literal = require("./literal");
const KIND = "string";
/**
* Defines a string (simple or double quoted) - chars are already escaped
* @constructor String
* @memberOf module:php-parser
* @extends {Literal}
* @property {boolean} unicode
* @property {boolean} isDoubleQuote
* @see {Encapsed}
* @property {string} value
*/
module.exports = Literal.extends(
KIND,
function String(isDoubleQuote, value, unicode, raw, docs, location) {
Literal.apply(this, [KIND, value, raw, docs, location]);
this.unicode = unicode;
this.isDoubleQuote = isDoubleQuote;
},
);

28
node_modules/php-parser/src/ast/switch.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
/**
* 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 = "switch";
/**
* Defines a switch statement
* @constructor Switch
* @memberOf module:php-parser
* @extends {Statement}
* @property {Expression} test
* @property {Block} body
* @property {boolean} shortForm
*/
module.exports = Statement.extends(
KIND,
function Switch(test, body, shortForm, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.test = test;
this.body = body;
this.shortForm = shortForm;
},
);

21
node_modules/php-parser/src/ast/throw.js generated vendored Executable file
View File

@@ -0,0 +1,21 @@
/**
* 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 = "throw";
/**
* Defines a throw statement
* @constructor Throw
* @memberOf module:php-parser
* @extends {Statement}
* @property {Expression} what
*/
module.exports = Statement.extends(KIND, function Throw(what, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.what = what;
});

24
node_modules/php-parser/src/ast/trait.js generated vendored Executable file
View File

@@ -0,0 +1,24 @@
/**
* Copyright (C) 2018 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
* @url http://glayzzle.com
*/
"use strict";
const Declaration = require("./declaration");
const KIND = "trait";
/**
* A trait definition
* @constructor Trait
* @memberOf module:php-parser
* @extends {Declaration}
* @property {Declaration[]} body
*/
module.exports = Declaration.extends(
KIND,
function Trait(name, body, docs, location) {
Declaration.apply(this, [KIND, name, docs, location]);
this.body = body;
},
);

Some files were not shown because too many files have changed in this diff Show More