mirror of
https://github.com/zhigang1992/esbuild.git
synced 2026-04-29 09:55:58 +08:00
update "scripts/gen-unicode-table.js"
This commit is contained in:
@@ -27,7 +27,7 @@ function generateRangeTable(codePoints) {
|
||||
index++;
|
||||
}
|
||||
let end = codePoints[index - 1];
|
||||
lines.push(`\t\t{0x${start.toString(16)}, 0x${end.toString(16)}, 1},`);
|
||||
lines.push(`\t\t{Lo: 0x${start.toString(16)}, Hi: 0x${end.toString(16)}, Stride: 1},`);
|
||||
}
|
||||
|
||||
lines.push(
|
||||
@@ -43,7 +43,7 @@ function generateRangeTable(codePoints) {
|
||||
index++;
|
||||
}
|
||||
let end = codePoints[index - 1];
|
||||
lines.push(`\t\t{0x${start.toString(16)}, 0x${end.toString(16)}, 1},`);
|
||||
lines.push(`\t\t{Lo: 0x${start.toString(16)}, Hi: 0x${end.toString(16)}, Stride: 1},`);
|
||||
}
|
||||
|
||||
lines.push(
|
||||
@@ -53,9 +53,9 @@ function generateRangeTable(codePoints) {
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.join(__dirname, '..', 'internal', 'lexer', 'unicode.go'),
|
||||
fs.writeFileSync(path.join(__dirname, '..', 'internal', 'js_lexer', 'unicode.go'),
|
||||
`// This file was automatically generated by ${path.basename(__filename)}. Do not edit.
|
||||
package lexer
|
||||
package js_lexer
|
||||
|
||||
import "unicode"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user