summaryrefslogtreecommitdiffstats
path: root/js/src/vm/UnicodeNonBMP.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-18 17:57:11 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-03-18 17:58:37 +0100
commitb2331d76221b67bffb5cb5a2344c8b150a305dc7 (patch)
tree5d9cae4cdfc502b568f436fd66d77e0b16476395 /js/src/vm/UnicodeNonBMP.h
parent122938a4398ae8db07060dca3561ff46f93b5925 (diff)
parent427e7346629c76a1676a3f92320c3d2575d01b85 (diff)
downloadUXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.tar
UXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.tar.gz
UXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.tar.lz
UXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.tar.xz
UXP-b2331d76221b67bffb5cb5a2344c8b150a305dc7.zip
Correctly tokenize valid JS names when using code points outside of BMP range.
This resolves #72. Merged remote-tracking branch 'janek/js_variable_unicode_1'
Diffstat (limited to 'js/src/vm/UnicodeNonBMP.h')
-rw-r--r--js/src/vm/UnicodeNonBMP.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/vm/UnicodeNonBMP.h b/js/src/vm/UnicodeNonBMP.h
index 6cc64cde4..f99e227cd 100644
--- a/js/src/vm/UnicodeNonBMP.h
+++ b/js/src/vm/UnicodeNonBMP.h
@@ -10,6 +10,16 @@
#ifndef vm_UnicodeNonBMP_h
#define vm_UnicodeNonBMP_h
+// |macro| receives the following arguments
+// macro(FROM, TO, LEAD, TRAIL_FROM, TRAIL_TO, DIFF)
+// FROM: code point where the range starts
+// TO: code point where the range ends
+// LEAD: common lead surrogate of FROM and TO
+// TRAIL_FROM: trail surrogate of FROM
+// TRAIL_FROM: trail surrogate of TO
+// DIFF: the difference between the code point in the range and
+// converted code point
+
#define FOR_EACH_NON_BMP_LOWERCASE(macro) \
macro(0x10400, 0x10427, 0xd801, 0xdc00, 0xdc27, 40) \
macro(0x104b0, 0x104d3, 0xd801, 0xdcb0, 0xdcd3, 40) \