nim-lang / nif

NIF is a text based data format designed for compiler frontend/backend communication or communication between different programming languages.
MIT License
44 stars 4 forks source link

Remove number and string literal suffixes #34

Closed Araq closed 2 months ago

Araq commented 2 months ago

These are a weird unnecessary special case for a Lisp that cause unnecessary complexity. Instead number should be like this:

Typed integer literals then can be modelled simply as (suf 234 "u32"). This takes up more space but this should be irrelevant.

ringabout commented 2 months ago

I'm working on nif output

echo (12'u32, 12.3, 12e2, 7.5f32, "123", r"debility")
(.nif24)
(.vendor "Nifler")
(.dialect "nim-parsed")
@0,1,/home/wind/defs/Nim/bug.nim(stmts
 (cmd
 echo @5(tupleConstr
 @1 (suf 12 "u32")@9 12.3 @15 1200.0 @21 (suf
 7.5 "f32"
)@29"123" @36(suf "debility" "R")
)
)
)