Last active
June 2, 2022 03:37
-
-
Save 1504168/fbeaa6aebf3d92660c2436a2348d0238 to your computer and use it in GitHub Desktop.
Properties(Getter and Setter creator from variable declaration line). Dependent on PROPERTYCODEGENERATOR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROPERTIESCODEGENERATOR = LAMBDA(AllVariableDeclarationCode,[IsOnlyGetter],LET( | |
AllPropertyCode, MAP(AllVariableDeclarationCode,LAMBDA(CurrentVariableDeclaration,PROPERTYCODEGENERATOR(CurrentVariableDeclaration,IsOnlyGetter))), | |
Result,REDUCE("",AllPropertyCode,LAMBDA(FinalCode,CurrentPropertyCode,FinalCode & CHAR(10) & CHAR(10) & CurrentPropertyCode)), | |
Result | |
) | |
); |
Updated to generate all the code in a single cell.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PROPERTYCODEGENERATOR >> https://gist.github.com/1504168/2acdb7b69e6c70c8f08c7b2bb8f8dd5b