| @@ 48-61 (lines=14) @@ | ||
| 45 | /** |
|
| 46 | * @inheritdocs |
|
| 47 | */ |
|
| 48 | public function _class($name, $file, $start_line, $end_line) { |
|
| 49 | assert('is_string($name)'); |
|
| 50 | assert('$file->type() == "file"'); |
|
| 51 | assert('is_int($start_line)'); |
|
| 52 | assert('is_int($end_line)'); |
|
| 53 | ||
| 54 | $class = $this->create_node |
|
| 55 | ( "class" |
|
| 56 | , [ "name" => $name |
|
| 57 | ] |
|
| 58 | ); |
|
| 59 | $this->add_definition($class, $file, $start_line, $end_line); |
|
| 60 | return $class; |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * @inheritdocs |
|
| @@ 88-102 (lines=15) @@ | ||
| 85 | /** |
|
| 86 | * @inheritdocs |
|
| 87 | */ |
|
| 88 | public function _function($name, $file, $start_line, $end_line) { |
|
| 89 | assert('is_string($name)'); |
|
| 90 | assert('$file->type() == "file"'); |
|
| 91 | assert('is_int($start_line)'); |
|
| 92 | assert('is_int($end_line)'); |
|
| 93 | ||
| 94 | $function = $this->create_node |
|
| 95 | ( "function" |
|
| 96 | , [ "name" => $name |
|
| 97 | ] |
|
| 98 | ); |
|
| 99 | $this->add_definition($function, $file, $start_line, $end_line); |
|
| 100 | ||
| 101 | return $function; |
|
| 102 | } |
|
| 103 | ||
| 104 | /** |
|
| 105 | * @inheritdocs |
|