Skip to content

pantoken-root / packages/utils/src / tokenNames

ฟังก์ชัน: tokenNames() ​

tokenNames(ir): Set<string>

เบต้า

ชุดของชื่อโทเค็นที่ IR กำหนด

พารามิเตอร์ ​

ir ​

อ่านอย่างเดียว Token[]

คืนค่า ​

Set<string>

ตัวอย่าง ​

ts
import { tokenNames } from "@pantoken/utils";
import type { Token } from "@pantoken/model";

const ir: Token[] = [
  { name: "--instui-leaf", syntax: "<color>", inherits: true, value: "#0374B5" },
];
tokenNames(ir); // → Set { "--instui-leaf" }