avh4 / elm-format

elm-format formats Elm source code according to a standard set of rules based on the official Elm Style Guide
BSD 3-Clause "New" or "Revised" License
1.31k stars 145 forks source link

best AST representation for literals #606

Open avh4 opened 5 years ago

avh4 commented 5 years ago

Part of #194.

should literals be represented as 🅰️

...
    | StringLiteral { value : String, ... }
    | FloatLiteral { value : Float, ... }
    | IntLiteral { value: Int, ... }
    | CharLiteral { value: String, ... }

or as 🅱️

 ...
    | Literal { value : LiteralValue }

LiteralValue =
    | StringValue { value : String, ... }
    | IntValue { value : Int, ... }
    ...

In favor of 🅰️:

In favor of 🅱️:

avh4 commented 5 years ago

My inclination at the moment is that point 🅱️ 1️⃣ is stronger than point 🅰️ 1️⃣