File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ an experiment and the start of a conversation.
77
88![ image] ( https://cloud.githubusercontent.com/assets/762848/19023070/4ab01c92-889a-11e6-9bb5-ec1a6816aba2.png )
99
10- This is the v1 branch, which changes data structures to support syntax added after the initial release for php 7.0 .
10+ This is the v0.1 branch, which changes data structures to support syntax added after the initial 0.0.x release line .
1111
1212## Get Started
1313After you've [ configured your machine] ( docs/GettingStarted.md ) , you can use the parser to generate and work
Original file line number Diff line number Diff line change @@ -32,13 +32,7 @@ public function getNodeKindName() : string {
3232 * @throws \Exception
3333 */
3434 public function getStartPosition () : int {
35- $ child = $ this ->getChildNodesAndTokens ()->current ();
36- if ($ child instanceof Node) {
37- return $ child ->getStartPosition ();
38- } elseif ($ child instanceof Token) {
39- return $ child ->start ;
40- }
41- throw new \Exception ("Unknown type in AST " );
35+ return $ this ->getChildNodesAndTokens ()->current ()->getStartPosition ();
4236 }
4337
4438 /**
@@ -58,15 +52,7 @@ public function getFullStartPosition() : int {
5852 $ child = $ child [0 ];
5953 }
6054
61- if ($ child instanceof Node) {
62- return $ child ->getFullStartPosition ();
63- }
64-
65- if ($ child instanceof Token) {
66- return $ child ->fullStart ;
67- }
68-
69- throw new \Exception ("Unknown type in AST: " . \gettype ($ child ));
55+ return $ child ->getFullStartPosition ();
7056 }
7157 };
7258
You can’t perform that action at this time.
0 commit comments