MCPcopy Create free account
hub / github.com/dirkvranckaert/AndroidDecompiler / parseOption

Method parseOption

astyle/src/astyle_main.cpp:2805–3370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2803}
2804
2805void ASOptions::parseOption(const string &arg, const string &errorInfo)
2806{
2807 if ( isOption(arg, "style=allman") || isOption(arg, "style=ansi")
2808 || isOption(arg, "style=bsd") || isOption(arg, "style=break") )
2809 {
2810 formatter.setFormattingStyle(STYLE_ALLMAN);
2811 }
2812 else if ( isOption(arg, "style=java") || isOption(arg, "style=attach") )
2813 {
2814 formatter.setFormattingStyle(STYLE_JAVA);
2815 }
2816 else if ( isOption(arg, "style=k&r") || isOption(arg, "style=kr") || isOption(arg, "style=k/r") )
2817 {
2818 formatter.setFormattingStyle(STYLE_KR);
2819 }
2820 else if ( isOption(arg, "style=stroustrup") )
2821 {
2822 formatter.setFormattingStyle(STYLE_STROUSTRUP);
2823 }
2824 else if ( isOption(arg, "style=whitesmith") )
2825 {
2826 formatter.setFormattingStyle(STYLE_WHITESMITH);
2827 }
2828 else if ( isOption(arg, "style=banner") )
2829 {
2830 formatter.setFormattingStyle(STYLE_BANNER);
2831 }
2832 else if ( isOption(arg, "style=gnu") )
2833 {
2834 formatter.setFormattingStyle(STYLE_GNU);
2835 }
2836 else if ( isOption(arg, "style=linux") || isOption(arg, "style=knf") )
2837 {
2838 formatter.setFormattingStyle(STYLE_LINUX);
2839 }
2840 else if ( isOption(arg, "style=horstmann") )
2841 {
2842 formatter.setFormattingStyle(STYLE_HORSTMANN);
2843 }
2844 else if ( isOption(arg, "style=1tbs") || isOption(arg, "style=otbs") )
2845 {
2846 formatter.setFormattingStyle(STYLE_1TBS);
2847 }
2848 else if ( isOption(arg, "style=google") )
2849 {
2850 formatter.setFormattingStyle(STYLE_GOOGLE);
2851 }
2852 else if ( isOption(arg, "style=pico") )
2853 {
2854 formatter.setFormattingStyle(STYLE_PICO);
2855 }
2856 else if ( isOption(arg, "style=lisp") || isOption(arg, "style=python") )
2857 {
2858 formatter.setFormattingStyle(STYLE_LISP);
2859 }
2860 else if ( isParamOption(arg, "A") )
2861 {
2862 int style = 0;

Callers

nothing calls this directly

Calls 15

setFormattingStyleMethod · 0.80
setSharpStyleMethod · 0.80
setModeManuallySetMethod · 0.80
setCStyleMethod · 0.80
setJavaStyleMethod · 0.80
setTabIndentationMethod · 0.80
setSpaceIndentationMethod · 0.80
setNamespaceIndentMethod · 0.80
setClassIndentMethod · 0.80

Tested by

no test coverage detected