Fixup Enum Generator

Summary:
https://github.com/facebook/yoga/pull/1116 adds a new enum. The enum generator is out of date with copyright header, and some codemods, but it also looks like there were manual changes, types added, etc since generation. I fixed up the script to incorporate generating the changes folks made manually, and also added an enum that was previously only added manually to the C ABI.

Changelog:
[General][Fixed] - Fixup Yoga Enum Generator

Reviewed By: yungsters

Differential Revision: D39922252

fbshipit-source-id: b678fa9a43a896873d8c434745bdaf3f16fd991f
This commit is contained in:
Nick Gerleman
2022-09-29 22:25:24 -07:00
committed by Facebook GitHub Bot
parent fd180de774
commit 5a18ccdbe2
41 changed files with 320 additions and 162 deletions

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaAlign {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaDimension {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaDirection {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaDisplay {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaEdge {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaExperimentalFeature {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaFlexDirection {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaJustify {
@@ -32,8 +34,7 @@ public enum YogaJustify {
case 2: return FLEX_END;
case 3: return SPACE_BETWEEN;
case 4: return SPACE_AROUND;
case 5:
return SPACE_EVENLY;
case 5: return SPACE_EVENLY;
default: throw new IllegalArgumentException("Unknown enum value: " + value);
}
}

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
import com.facebook.proguard.annotations.DoNotStrip;

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaMeasureMode {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaNodeType {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaOverflow {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaPositionType {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaPrintOptions {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaUnit {

View File

@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
// @generated by enums.py
package com.facebook.yoga;
public enum YogaWrap {