Champii / Rock

Native language with Rust & LLVM
GNU General Public License v3.0
67 stars 3 forks source link

Literals work awfully with the dot notation #96

Open Champii opened 2 years ago

Champii commented 2 years ago

The parser has trouble using literals with the dot notation

The following

main: -> 1.print()

Is parsed as

main: -> 1.0(print())

There is trouble with Float64 particularly as it produce a hard parse error:

main: -> 2.2.print()

The Bool and String work well. The problem is obviously when parsing the dot .

Champii commented 2 years ago

The current workaround is to put the incriminated literals between parenthesis

main: ->
  (1).print()
  (2.2).print()