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" }