Re: support C/C++ identifiers named with non-ASCII characters

張俊芝
2018-05-22T15:48:59Z

Pedro Alves æ–¼ 2018/5/22 ä¸‹åˆ11:17 å¯«é“:

>>
>> I found the patch. Let me rebase it and send it / post it. It'll
>> be easier to just look at the patch.
>
> Here it is. So this is reusing the same logic added to
> cp-name-parser.y, in the C/C++ expression parser as well.
>

I read through your code. If I understand it correctly, you keep all the
valid ASCII characters, and treat all non-ASCII characters "as valid".

This is pretty much the same thing as I did. The only difference is that
I blacklist invalid ASCII characters and you whitelist valid ASCII
characters. But we both "validate" all the non-ASCII characters.

But I think your code seems better than mine because it updates and
reuses some common code. So I think I can abondon my patch and the
unfinished test case.