1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Revert XHP classtag support in arcanist

Summary:
Revert of D715, which allowed you to put xhp classes into libphutil libraries.
We're removing support for XHP in resolving T635.

According to @ide, removing this won't break anything.

Test Plan: Straight revert. Grepped for methods.

Reviewers: btrahan, ide, nh, jungejason

Reviewed By: ide

CC: aran, epriestley

Maniphest Tasks: T635

Differential Revision: https://secure.phabricator.com/D1511
This commit is contained in:
epriestley 2012-01-28 11:18:33 -08:00
parent 0781554a22
commit 3ccb418b93

View file

@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -65,7 +65,6 @@ class PhutilModuleRequirements {
}
public function addClassDeclaration(XHPASTNode $where, $name) {
$name = self::mungeXHPClassName($name);
return $this->addDeclaration('class', $where, $name);
}
@ -99,10 +98,8 @@ class PhutilModuleRequirements {
}
public function addClassDependency($child, XHPASTNode $where, $name) {
$name = self::mungeXHPClassName($name);
if ($child !== null) {
if (empty($this->builtins['class'][$name])) {
$child = self::mungeXHPClassName($child);
$this->chain['class'][$child] = $name;
}
}
@ -177,12 +174,4 @@ class PhutilModuleRequirements {
);
}
private static function mungeXHPClassName($name) {
if (strlen($name) && $name[0] == ':') {
// XHP's semantic actions munge element names without a preceding colon.
$name = substr($name, 1);
return 'xhp_'.str_replace(array(':', '-'), array('__', '_'), $name);
}
return $name;
}
}