Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

Decimal values should be created through constructor #871

@iskiselev

Description

@iskiselev

JSIL use special type for handling decimal values (separate from Number), but still use raw Number if decimal created through JSNumberLiteral.
We should fix it. @kg which option do you prefer:

  1. Replace JSNumberLiteral with constructor call as step of pipeline (I suppose something similar happens with int64?)
  2. Create JSDecimalLiteral and return it from JSLiteral.New(decimal) with special method in JavascriptAstEmitter.
  3. Just write special logic inside JavascriptAstEmitter.VisitNode (JSNumberLiteral number).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions