import { Node } from "./node" ; export interface IntegerLiteral extends Node { value : number ; } export function isIntegerLiteral ( node ) { return node . type === "IntegerLiteral" ; } export interface FloatLiteral extends Node { value : number ; } export function isFloatLiteral ( node ) { return node . type === "FloatLiteral" ; } export interface BooleanLiteral extends Node { value : boolean ; } export function isBooleanLiteral ( node ) { return node . type === "BooleanLiteral" ; } export interface StringLiteral extends Node { value : string ; } export function isStringLiteral ( node ) { return node . type === "StringLiteral" ; } export type Literal = IntegerLiteral | FloatLiteral | StringLiteral | BooleanLiteral ; export function isLiteral ( node ) { return isIntegerLiteral ( node ) || isFloatLiteral ( node ) || isStringLiteral ( node ) || isBooleanLiteral ( node ) ; }