This commit is contained in:
Darío Hereñú 2018-03-18 00:39:15 -03:00 коммит произвёл GitHub
Родитель 694b1538bb
Коммит eca28485da
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -159,7 +159,7 @@ Node: {
```
#### Notes
In order to reduce memory usage, we plan to remove the NodeKind property, and instead rely soley on
In order to reduce memory usage, we plan to remove the NodeKind property, and instead rely solely on
subclasses in order to represent the Node's kind. This should reduce memory usage by ~16 bytes per
Node.
@ -182,7 +182,7 @@ WIDTH(T) -> T.Width
#### Invariants
* Invariants for all Tokens hold true
* The tree contains every token
* span of any node is sum of spans of child nodes and tokens
* Span of any node is sum of spans of child nodes and tokens
* The tree length exactly matches the file length
* Every leaf node of the tree is a token
* Every Node contains at least one Token
@ -222,7 +222,7 @@ if ($expression // ) <- MissingToken
```
In this case, `eat(")")` will generate a `MissingToken` because the grammar expects a
token to be there, but it does not exist.
token to be there, but it does not exist.
##### Example 2
```php
@ -280,7 +280,7 @@ if ($a >
In this case, the user likely intended the type of `$b` to be `MyClass`. However,
because under normal circumstances, parsers will ignore whitespace, the example above
would produce the following tree, whic himplies that the `$b` assignment never happens.
would produce the following tree, which implies that the `$b` assignment never happens.
```
SourceFileNode
- IfNode
@ -389,4 +389,4 @@ significant boost and works on a wide variety of machine configurations.
* Fuzz testing - test the parser against automatically generated inputs to exercise edge cases in a bulk fashion, and
and ensure expected properties of the tree.
* Community feedback - try and get the parser in the hands of as many people as possible so we can validate a
wide range of use cases. The Syntax Visualizer tool is one tool to help us increase reach.
wide range of use cases. The Syntax Visualizer tool is one tool to help us increase reach.