import { Method } from "../data/types" ; import { initializeMethods } from "../data/helper" ; import { Token , TokenValue } from "../structures/token" ; import { ErrorHandler } from "../structures/errorhandler" ; export class LSNumber { content : number ; methods : Map < string , Method > ; properties : Map < string , TokenValue > ; constructor ( content ) { this . content = content ; this . methods = initializeMethods ( NumberMethods , content , [ "Any" ] , false ) ; this . properties = initializeProperties ( content ) ; } get ( name ) { let result = this . properties . get ( name ) ; if ( result ) return result ; result = this . methods . get ( name ) ; return result ? result : null ; } } function initializeProperties ( content ) { let p = new Map ( ) ; return p ; } let NumberMethods = [ { name : "string" , arguments : [ ] , arity : [ 0 , 0 ] , call ( content , args , e ? ) { return content . toString ( ) ; } } ] ;