Ejemplo n.º 1
0
	protected function _make_internal_message(\Reflector $reflection) {
		$type = false;
		$name = false;
		$location = false;
		
		if($reflection instanceof \ReflectionFunction) {
			$type = 'function';
			$name = $reflection->name;
		}
		elseif($reflection instanceof \ReflectionClass) {
			$type = 'class';
			$name = $reflection->name;
		}
		elseif($reflection instanceof \ReflectionMethod) {
			$type = 'method';
			$name = $reflection->getDeclaringClass()->name . '::' . $reflection->name;
		}
		
		$location = $reflection->getFileName() . ':' . $reflection->getStartLine();
		
		Ev\Evaluer::make_internal_from(
			Ev\Evaluer::SOURCE_OUTPUT,
			sprintf("Source Code for %s '%s' (%s)", $type, $name, $location)
		);
	}
Ejemplo n.º 2
0
	public static function parse($line, $statement) {
		Evaluer::make_internal_from(
			Evaluer::SOURCE_OUTPUT,
			'History'
		);
		
		return substr($line, 0, 1) === '!' ? self::parse_bang($line) : self::parse_history($line);
	}
Ejemplo n.º 3
0
	protected static function error_in_eval($title, $message) {
		S\evlr\Evaluer::make_internal_from(
			S\evlr\Evaluer::SOURCE_OUTPUT,
			$title
		);
		
		echo $message;
		
		return \AIP\lib\hlprs\NotReturnable::i();
	}