]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Revert XHP classtag support in arcanist
authorepriestley <git@epriestley.com>
Sat, 28 Jan 2012 19:18:33 +0000 (11:18 -0800)
committerepriestley <git@epriestley.com>
Sat, 28 Jan 2012 19:18:33 +0000 (11:18 -0800)
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

src/parser/phutilmodule/PhutilModuleRequirements.php

index 779b01791bb2f737dcfcdcf7cd0c27f7d4fd9a1b..894932b6052f62efc6aa61178002973a05611e39 100644 (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;
-  }
 }