depath
depath copied to clipboard
能帮忙解答一下这段代码什么意思吗
`const fullCharCodeAtPos = (input: string, pos: number) => { const code = input.charCodeAt(pos) // 合法字符的判断,能给个依据吗,我在网上搜到这个判断,但不知道出处在哪 if (code <= 0xd7ff || code >= 0xe000) return code
const next = input.charCodeAt(pos + 1) // 以下这个运算没看懂 return (code << 10) + next - 0x35fdc00 }`
https://github.com/acornjs/acorn/issues/708