Changeset View
Changeset View
Standalone View
Standalone View
support/diviner/engine/JavelinDivinerEngine.php
| Show First 20 Lines • Show All 304 Lines • ▼ Show 20 Lines | protected function parseMethod(array $ast, $as_function = false) { | ||||
| } | } | ||||
| return $method; | return $method; | ||||
| } | } | ||||
| protected function failParse(array $ast, $reason) { | protected function failParse(array $ast, $reason) { | ||||
| throw new Exception( | throw new Exception( | ||||
| "Parsing failed at line ".$this->getNodeLine($ast).": ".$reason); | 'Parsing failed at line '.$this->getNodeLine($ast).': '.$reason); | ||||
| } | } | ||||
| protected function getObjectLiteralPropertyLine(array $ast, $property) { | protected function getObjectLiteralPropertyLine(array $ast, $property) { | ||||
| $this->expectNode($ast, 'ObjectLiteral'); | $this->expectNode($ast, 'ObjectLiteral'); | ||||
| foreach ($this->getNodeChildren($ast) as $child) { | foreach ($this->getNodeChildren($ast) as $child) { | ||||
| $this->expectNode($child, 'ObjectLiteralProperty'); | $this->expectNode($child, 'ObjectLiteralProperty'); | ||||
| $name = $this->getNodeValue($this->getNodeChild($child, 0)); | $name = $this->getNodeValue($this->getNodeChild($child, 0)); | ||||
| if ($name == $property) { | if ($name == $property) { | ||||
| ▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines | |||||