buxlabs / abstract-syntax-tree

A library for working with abstract syntax trees.
MIT License
110 stars 13 forks source link

Type Literal instead of BigIntLiteral #111

Closed Tc14Hd closed 1 year ago

Tc14Hd commented 2 years ago

The code

tree = ast.parse("1000000000000000n");
console.log(tree.body[0].expression);

outputs a node of type "Literal":

{
  type: 'Literal',
  value: 1000000000000000n,
  bigint: '1000000000000000'
}

But the README implies that the type should rather be "BigIntLiteral". Is this a bug?

emilos commented 1 year ago

@Tc14Hd thanks! That's a bug in the readme, not intentional. I've removed the falsy example.