The preprocessor only allows things that match ?[%w,_ =\"]*
pattern in attributes.
This includes strings too, so strings containing e.g. dots (.
) or other punctuation break the preprocessor.
I discovered while fixing ACE-Project-Team/ArmoredCombatExtended#201 .
Better string rules (anything from quote to paired unescaped quote makes a string) will probably require replacing regex-based parser with something more powerful.
|
for a_begin, attributes, h_begin, ret, thistype, colon, name, args, whitespace, equals, h_end in contents:gmatch("()(%[?[%w,_ =\"]*%]?)[\r\n\t ]*()e2function%s+(" .. p_typename .. ")%s+([a-z0-9]-)%s*(:?)%s*(" .. p_func_operator .. ")%(([^)]*)%)(%s*)(=?)%s*()") do |