XHP refactoring using the pfff low-level transformation API
XHP refactoring using the pfff low-level transformation API

Summary:
From the code:
(*
 * The transformation below can be encoded via this syntactical patch:
 *
 * <ui:section-header
 * -   border=X
 * ></ui:section-header>
 *
 * There are nevertheless currenty a few limitations in spatch which
 * will cause this syntactical patch to fail to transform all the
 * relevant code (e.g. because of some XHP isomorphisms not yet
 * handled by spatch). In the mean time the code below uses the low-level
 * transformation API of pfff to express the same transformation;
 * it can be used as a reference for spatch to compare with.
 *)

Task ID: #

Blame Rev:

Reviewers: ngao, mroch

CC: ahupp

Test Plan:
$./spatch -remove_border_attribute tests/php/spatch/
--- /data/users/pad/github/pfff/tests/php/spatch/border.php	2010-11-05 22:03:48.000000000 -0700
+++ /tmp/trans-1391-3aac1f.php	2010-11-11 16:01:27.000000000 -0800
@@ -1,5 +1,5 @@
 <?php

-$a = <ui:section-header href="foo" border="1" >
+$a = <ui:section-header href="foo" >
      This is nuts
      </ui:section-header>;
...

 <?php

-$a = <ui:section-header border={"bar"} >
+$a = <ui:section-header >
      This is nuts
      </ui:section-header>;

...

 <?php

-$a = <ui:section-header href="foo" border="1" >
+$a = <ui:section-header href="foo" >
      This is nuts
      </ui:section-header>;
...

 <?php

-$a = <ui:section-header href="foo" border={"1"} >
+$a = <ui:section-header href="foo" >
      This is nuts
      </ui:section-header>;

Revert Plan:

Tags:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

DiffCamp Revision: 181571

mutantzombie/pfff,Hyunha/pfff,Hyunha/pfff,juergenhoetzel/pfff,mutantzombie/pfff,egonSchiele/pfff,mutantzombie/pfff,mutantzombie/pfff,juergenhoetzel/pfff,egonSchiele/pfff,rpau/pfff,rpau/pfff,rpau/pfff,juergenhoetzel/pfff,Hyunha/pfff,mutantzombie/pfff,Hyunha/pfff,rpau/pfff,Hyunha/pfff,Hyunha/pfff,mutantzombie/pfff,mutantzombie/pfff,rpau/pfff,rpau/pfff,Hyunha/pfff,Hyunha/pfff,rpau/pfff,juergenhoetzel/pfff,egonSchiele/pfff,juergenhoetzel/pfff,mutantzombie/pfff,mutantzombie/pfff,egonSchiele/pfff,mutantzombie/pfff,egonSchiele/pfff,juergenhoetzel/pfff,egonSchiele/pfff,egonSchiele/pfff,juergenhoetzel/pfff,egonSchiele/pfff,rpau/pfff,juergenhoetzel/pfff,egonSchiele/pfff,juergenhoetzel/pfff,Hyunha/pfff,rpau/pfff,egonSchiele/pfff,rpau/pfff,Hyunha/pfff,juergenhoetzel/pfff,mutantzombie/pfff