func (n Int) HWrite(w HWriter) {
	w.Writef("%d", n.Val)
}
HWrite prints a tree representation of the node.
package ast
import (
	"bytes"
	"strconv"
	"strings"
	"github.com/arnodel/golua/token"
)
func NewNumber(id *token.Token) (ExpNode, error) {
	loc := LocFromToken(id)
	nstring := string(id.Lit)
	if isFloatToken(id) {
		f, err := strconv.ParseFloat(nstring, 64)
		if err != nil {
			return nil, err
		}
		return Float{Location: loc, Val: f}, nil
	}
	var n uint64
	var err error
	if strings.HasPrefix(nstring, "0x") || strings.HasPrefix(nstring, "0X") {
		nstring = nstring[2:]
		if len(nstring) > 16 {
			nstring = nstring[len(nstring)-16:]
		}
		n, err = strconv.ParseUint(nstring, 16, 64)
	} else {
		n, err = strconv.ParseUint(nstring, 10, 64)
	}
	if err != nil {
		return nil, err
	}
	return Int{Location: loc, Val: n}, nil
}
func IsNumber(e ExpNode) bool {
	n, ok := e.(numberOracle)
	return ok && n.isNumber()
}
type Int struct {
	Location
	Val uint64
}
var _ ExpNode = Int{}
func NewInt(val uint64) Int {
	return Int{Val: val}
}