public static function parameters($tokenId, array $tokens) {
		$params = array();
		if ($tokens[$tokenId]['id'] !== T_FUNCTION) {
			throw new \Exception('Cannot call params on non function');
		}
		$foundOpen = false;
		$total = count($tokens);
		for ($key = $tokenId; $key <= $total; $key++) {
			$token = $tokens[$key];
			if ($foundOpen) {
				if ($token['content'] === ')') {
					break;
				} elseif ($token['id'] === T_VARIABLE) {
					$params[] = $key;
				}
			} elseif ($token['content'] === '(') {
				$foundOpen = true;
			}
		}
		return $params;
	}