import { Parser } from "@siteimprove/alfa-parser" ; import { Slice } from "@siteimprove/alfa-slice" ; import { Token } from "../syntax/token" ; import { Keyword } from "./keyword" ; const { either } = Parser ; /**
 *  https public export type Box = Keyword < "border-box" > | Keyword < "padding-box" > | Keyword < "content-box" > ; public export namespace Box { export type JSON = Keyword . JSON < "border-box" > | Keyword . JSON < "padding-box" > | Keyword . JSON < "content-box" > ; export const parse = Keyword . parse ( "border-box" , "padding-box" , "content-box" ) ; /**
     *  https export type Shape = Box | Keyword < "margin-box" > ; export namespace Shape { export type JSON = Box . JSON | Keyword . JSON < "margin-box" > ; } export const parseShape = either ( parse , Keyword . parse ( "margin-box" ) ) ; /**
     *  https export type Geometry = Shape | Keyword < "fill-box" > | Keyword < "stroke-box" > | Keyword < "view-box" > ; export namespace Geometry { export type JSON = Shape . JSON | Keyword . JSON < "fill-box" > | Keyword . JSON < "stroke-box" > | Keyword . JSON < "view-box" > ; } export const parseGeometry = either ( parseShape , Keyword . parse ( "fill-box" , "stroke-box" , "view-box" ) ) ; }