Skip to content

Commit

Permalink
Merge pull request #55 from kiokuless/master
Browse files Browse the repository at this point in the history
Ignore `goto` at REGEX_TYPE
  • Loading branch information
cacharle committed Jul 18, 2023
2 parents 4e6d0d6 + d350ff9 commit 8d72dfc
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 8d72dfc

Please sign in to comment.