UNPKG

php-parser

Version:

Parse PHP code from JS and returns its AST

22 lines (20 loc) 441 B
/** * Copyright (C) 2018 Glayzzle (BSD3 License) * @authors https://github.com/glayzzle/php-parser/graphs/contributors * @url http://glayzzle.com */ "use strict"; module.exports = { /* * ```ebnf * start ::= (namespace | top_statement)* * ``` */ read_start: function () { if (this.token == this.tok.T_NAMESPACE) { return this.read_namespace(); } else { return this.read_top_statement(); } }, };