import { Parser } from "@siteimprove/alfa-parser" ; import { Slice } from "@siteimprove/alfa-slice" ; import { Token } from "../syntax/token" ; import { Numeric } from "./numeric" ; const { map } = Parser ; /**
 *  https public export class Number extends Numeric < "number" > { public static of ( value ) { return new Number ( value ) ; } private constructor ( value ) { super ( value ) ; } public get type ( ) : "number" { return "number" ; } public equals ( value ) { return value instanceof Number && super . equals ( value ) ; } public toJSON ( ) { return { type : "number" , value : this . _value , } ; } } public export namespace Number { export interface JSON extends Numeric . JSON < "number" > { value : number ; } export function isNumber ( value ) { return value instanceof Number ; } /**
     *  https export const parseZero = map ( Token . parseNumber ( ( number ) => number . value === 0 ) , ( number ) => Number . of ( number . value ) ) ; /**
     *  https export const parse = map ( Token . parseNumber ( ) , ( number ) => Number . of ( number . value ) ) ; }