Skip to content

Commit 20af5c0

Browse files
committed
rebuild documentation
1 parent 5aecc11 commit 20af5c0

File tree

3 files changed

+40
-36
lines changed

3 files changed

+40
-36
lines changed

docs/AST.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,6 @@
22

33
## AST
44

5-
The AST builder class
6-
7-
**Parameters**
8-
9-
- `withPositions`
10-
- `withSource`
11-
12-
**Properties**
13-
14-
- `withPositions` **[Boolean](#boolean)** Should locate any node (by default false)
15-
- `withSource` **[Boolean](#boolean)** Should extract the node original code (by default false)
16-
17-
### resolvePrecedence
18-
19-
Check and fix precence, by default using right
20-
21-
**Parameters**
22-
23-
- `result`
24-
25-
### prepare
26-
27-
Prepares an AST node
28-
29-
**Parameters**
30-
31-
- `kind` **([String](#string) | null)** Defines the node type
32-
(if null, the kind must be passed at the function call)
33-
- `parser` **Parser** The parser instance (use for extracting locations)
34-
35-
Returns **[Function](#function)**
36-
37-
## AST
38-
395
## Class hierarchy
406

417
- [Location](#location)
@@ -151,6 +117,40 @@ Prepares an AST node
151117

152118
Returns **[Function](#function)**
153119

120+
## AST
121+
122+
The AST builder class
123+
124+
**Parameters**
125+
126+
- `withPositions`
127+
- `withSource`
128+
129+
**Properties**
130+
131+
- `withPositions` **[Boolean](#boolean)** Should locate any node (by default false)
132+
- `withSource` **[Boolean](#boolean)** Should extract the node original code (by default false)
133+
134+
### resolvePrecedence
135+
136+
Check and fix precence, by default using right
137+
138+
**Parameters**
139+
140+
- `result`
141+
142+
### prepare
143+
144+
Prepares an AST node
145+
146+
**Parameters**
147+
148+
- `kind` **([String](#string) | null)** Defines the node type
149+
(if null, the kind must be passed at the function call)
150+
- `parser` **Parser** The parser instance (use for extracting locations)
151+
152+
Returns **[Function](#function)**
153+
154154
## Array
155155

156156
**Extends Expression**

docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ var parser = require('php-parser');
1111
var instance = new parser({
1212
parser: {
1313
extractDoc: true,
14-
suppressErrors: true
14+
suppressErrors: true,
15+
php7: true
1516
},
1617
ast: {
1718
withPositions: true

docs/parser.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ Reading trait alias
238238
trait_use_alias ::= namespace_name ( T_DOUBLE_COLON T_STRING )? (T_INSTEADOF namespace_name) | (T_AS member_flags? T_STRING)
239239
```
240240

241+
name list : <https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L303>
242+
trait adaptation : <https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L742>
243+
241244
## read_variable_declaration
242245

243246
Reads a variable declaration
@@ -251,7 +254,7 @@ Reads a variable declaration
251254
Reads a constant declaration
252255

253256
```ebnf
254-
constant_declaration ::= T_STRING '=' expr
257+
constant_declaration ::= (T_STRING | IDENTIFIER) '=' expr
255258
```
256259

257260
Returns **Constant** [:link:](AST.md#constant)

0 commit comments

Comments
 (0)