Skip to content

Commit

Permalink
Ignore goto at REGEX_TYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
kiokuless committed Jul 16, 2023
1 parent 4e6d0d6 commit d350ff9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions c_formatter_42/formatters/helper.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# ############################################################################ #
# **************************************************************************** #
# #
# ::: :::::::: #
# helper.py :+: :+: :+: #
# +:+ +:+ +:+ #
# By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ #
# By: kiokuless <me[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# 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)
Expand Down

0 comments on commit d350ff9

Please sign in to comment.