2
2
*
3
3
* Package: php-parser
4
4
* Parse PHP code and returns its AST
5
- * Build: f51f84a34978762ac856
5
+ * Build: de17d352b01518bc053a - 2018-7-29
6
6
* License: BSD-3-Clause
7
7
* Author: Ioan CHIRIAC
8
8
*
@@ -3111,6 +3111,7 @@ var Position = __webpack_require__(88);
3111
3111
/**
3112
3112
* The AST builder class
3113
3113
* @constructor AST
3114
+ * @tutorial AST
3114
3115
* @property {Boolean } withPositions - Should locate any node (by default false)
3115
3116
* @property {Boolean } withSource - Should extract the node original code (by default false)
3116
3117
*/
@@ -3282,7 +3283,10 @@ module.exports = AST;
3282
3283
*/
3283
3284
3284
3285
3285
- // exports token index
3286
+ /**
3287
+ * PHP AST Tokens
3288
+ * @type {Object }
3289
+ */
3286
3290
3287
3291
module . exports = {
3288
3292
values : {
@@ -6648,7 +6652,7 @@ module.exports = {
6648
6652
6649
6653
6650
6654
/**
6651
- * @private check if argument is a number
6655
+ * @private
6652
6656
*/
6653
6657
6654
6658
function isNumber ( n ) {
@@ -6657,7 +6661,9 @@ function isNumber(n) {
6657
6661
6658
6662
/**
6659
6663
* The PHP Parser class that build the AST tree from the lexer
6660
- * @constructor {Parser }
6664
+ *
6665
+ * @class
6666
+ * @tutorial Parser
6661
6667
* @property {Lexer } lexer - current lexer instance
6662
6668
* @property {AST } ast - the AST factory instance
6663
6669
* @property {Integer|String } token - current token
@@ -8310,7 +8316,6 @@ module.exports = {
8310
8316
module . exports = {
8311
8317
/**
8312
8318
* Reads a single line comment
8313
- * @see
8314
8319
*/
8315
8320
T_COMMENT : function T_COMMENT ( ) {
8316
8321
while ( this . offset < this . size ) {
@@ -8373,7 +8378,7 @@ module.exports = {
8373
8378
* This is the php lexer. It will tokenize the string for helping the
8374
8379
* parser to build the AST from its grammar.
8375
8380
*
8376
- * @public @constructor { Lexer }
8381
+ * @class
8377
8382
* @property {Integer } EOF
8378
8383
* @property {Boolean } all_tokens defines if all tokens must be retrieved (used by token_get_all only)
8379
8384
* @property {Boolean } comment_tokens extracts comments tokens
@@ -10895,7 +10900,7 @@ var tokens = __webpack_require__(91);
10895
10900
var AST = __webpack_require__ ( 90 ) ;
10896
10901
10897
10902
/**
10898
- * @private combine structures
10903
+ * @private
10899
10904
*/
10900
10905
function combine ( src , to ) {
10901
10906
var keys = Object . keys ( src ) ;
@@ -10921,8 +10926,9 @@ function combine(src, to) {
10921
10926
/**
10922
10927
* Initialise a new parser instance with the specified options
10923
10928
*
10924
- * Usage :
10925
- * ```js
10929
+ * @class
10930
+ * @tutorial Engine
10931
+ * @example
10926
10932
* var parser = require('php-parser');
10927
10933
* var instance = new parser({
10928
10934
* parser: {
@@ -10942,11 +10948,8 @@ function combine(src, to) {
10942
10948
* var evalAST = instance.parseEval('some php code');
10943
10949
* var codeAST = instance.parseCode('<?php some php code', 'foo.php');
10944
10950
* var tokens = instance.tokenGetAll('<?php some php code');
10945
- * ```
10946
10951
*
10947
- * @constructor {Engine }
10948
10952
* @param {Object } options - List of options
10949
- *
10950
10953
* @property {Lexer } lexer
10951
10954
* @property {Parser } parser
10952
10955
* @property {AST } ast
0 commit comments