mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:42:43 +00:00 
			
		
		
		
	Everywhere: Run clang-format
This commit is contained in:
		
							parent
							
								
									0376c127f6
								
							
						
					
					
						commit
						086969277e
					
				
					 1665 changed files with 8479 additions and 8479 deletions
				
			
		|  | @ -211,12 +211,12 @@ parse_state_machine(StringView input) | |||
|     return state_machine; | ||||
| } | ||||
| 
 | ||||
| void output_header(const StateMachine&, SourceGenerator&); | ||||
| void output_header(StateMachine const&, SourceGenerator&); | ||||
| 
 | ||||
| int main(int argc, char** argv) | ||||
| { | ||||
|     Core::ArgsParser args_parser; | ||||
|     const char* path = nullptr; | ||||
|     char const* path = nullptr; | ||||
|     args_parser.add_positional_argument(path, "Path to parser description", "input", Core::ArgsParser::Required::Yes); | ||||
|     args_parser.parse(argc, argv); | ||||
| 
 | ||||
|  | @ -235,11 +235,11 @@ int main(int argc, char** argv) | |||
|     return 0; | ||||
| } | ||||
| 
 | ||||
| HashTable<String> actions(const StateMachine& machine) | ||||
| HashTable<String> actions(StateMachine const& machine) | ||||
| { | ||||
|     HashTable<String> table; | ||||
| 
 | ||||
|     auto do_state = [&](const State& state) { | ||||
|     auto do_state = [&](State const& state) { | ||||
|         if (state.entry_action.has_value()) | ||||
|             table.set(state.entry_action.value()); | ||||
|         if (state.exit_action.has_value()) | ||||
|  | @ -257,13 +257,13 @@ HashTable<String> actions(const StateMachine& machine) | |||
|     return table; | ||||
| } | ||||
| 
 | ||||
| void generate_lookup_table(const StateMachine& machine, SourceGenerator& generator) | ||||
| void generate_lookup_table(StateMachine const& machine, SourceGenerator& generator) | ||||
| { | ||||
|     generator.append(R"~~~( | ||||
|     static constexpr StateTransition STATE_TRANSITION_TABLE[][256] = { | ||||
| )~~~"); | ||||
| 
 | ||||
|     auto generate_for_state = [&](const State& s) { | ||||
|     auto generate_for_state = [&](State const& s) { | ||||
|         auto table_generator = generator.fork(); | ||||
|         table_generator.set("active_state", s.name); | ||||
|         table_generator.append("/* @active_state@ */ { "); | ||||
|  | @ -295,7 +295,7 @@ void generate_lookup_table(const StateMachine& machine, SourceGenerator& generat | |||
| )~~~"); | ||||
| } | ||||
| 
 | ||||
| void output_header(const StateMachine& machine, SourceGenerator& generator) | ||||
| void output_header(StateMachine const& machine, SourceGenerator& generator) | ||||
| { | ||||
|     generator.set("class_name", machine.name); | ||||
|     generator.set("initial_state", machine.initial_state); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Idan Horowitz
						Idan Horowitz