From d350ff9c3df474e2443b0b5fbd7644c6f6162427 Mon Sep 17 00:00:00 2001 From: kiokuless Date: Mon, 17 Jul 2023 02:30:34 +0900 Subject: [PATCH] Ignore `goto` at REGEX_TYPE --- c_formatter_42/formatters/helper.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/c_formatter_42/formatters/helper.py b/c_formatter_42/formatters/helper.py index e7475b0..7f8656f 100644 --- a/c_formatter_42/formatters/helper.py +++ b/c_formatter_42/formatters/helper.py @@ -1,19 +1,19 @@ -# ############################################################################ # +# **************************************************************************** # # # # ::: :::::::: # # helper.py :+: :+: :+: # # +:+ +:+ +:+ # -# By: cacharle +#+ +:+ +#+ # +# By: kiokuless +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/10/04 11:38:00 by cacharle #+# #+# # -# Updated: 2021/02/08 18:22:06 by charles ### ########.fr # +# Updated: 2023/07/17 02:28:52 by kiokuless ### ########.fr # # # -# ############################################################################ # +# **************************************************************************** # import re # regex for a type -REGEX_TYPE = r"(?!return)([a-z]+\s+)*[a-zA-Z_]\w*" +REGEX_TYPE = r"(?!return|goto)([a-z]+\s+)*[a-zA-Z_]\w*" # regex for a c variable/function name REGEX_NAME = r"\**[a-zA-Z_*()]\w*" # regex for a name in a declaration context (with array and function ptr)