public static function matchToken($pattern, $token) {
		if ($pattern['name'] !== $token['name']) {
			return false;
		}

		if (!isset($pattern['content'])) {
			return true;
		}

		$match = $pattern['content'];
		$content = $token['content'];

		if ($pattern['name'] === 'T_VARIABLE') {
			$match = substr($match, 1);
			$content = substr($content, 1);
		}

		switch (true) {
			case ($match === '_' || $match === $content):
				return true;
		}
		return false;
	}