/
(?x)^
(?<StatementDesc>(?:
(?:
[\/\/].+(?=\n)\n)*
)*
)
(?:
(?:
# Begin Function Declaration
func[[:space:]]+
# Datatype Method?
(?:
\(
(?<funcRecvrVar>[a-zA-Z_]+)
[[:space:]]+
(?<funcRecvrTypePointerChar>\*?)
(?<funcRecvrType>[^[[:space:]\)]+)
(?<funcRecvrErr>.*?(?=[\)]))
\)
)?
[[:space:]]*
# Function Name
(?<funcName>[a-zA-Z]+)
[[:space:]]*
# Parameters
\((?<funcParamBody>
# <funcParam> is optional
(?<funcParam>
(?<funcParam1>
(?<funcParam1Name>
[A-Za-z_\d]+
(?:
[[:space:]]+
(?<funcParam1Type>
[A-Za-z_\d]+
[[:space:]]*
)?
|
[[:space:]]*
)?
)
)
# Next Parameter recursion
(?:
# Check if comma
(?=,)[,]
[[:space:]]*
(?<funcParam2>
(?<funcParam2Name>
[A-Za-z_\d]+
(?:
[[:space:]]+
(?<funcParam2Type>
[A-Za-z_\d]+
[[:space:]]*
)?
|
[[:space:]]*
)?
)
)
# Next Parameter recursion
(?:
# Check if comma
(?=,)[,]
[[:space:]]*
(?<funcParam3>
(?<funcParam3Name>
[A-Za-z_\d]+
(?:
[[:space:]]+
(?<funcParam3Type>
[A-Za-z_\d]+
[[:space:]]*
)?
|
[[:space:]]*
)?