amuletml / amulet

An ML-like functional programming language
https://amulet.works/
BSD 3-Clause "New" or "Revised" License
324 stars 14 forks source link

Lua parser does not recognise bit ops #295

Closed plt-amy closed 3 years ago

plt-amy commented 3 years ago
> external val blshift : int -> int -> int = "function(x, y) return x << y end"
=stdin[1:1 ..1:77]: warning (W3003)
  Syntax error in definition of blshift
  │ 
1 │ external val blshift : int -> int -> int = "function(x, y) return x << y end"
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

definition of blshift[1:26 ..1:26]: error 
  Unexpected <, expected one of false, function, nil, not, true, '...', '(', '{', '-', '#', identifier, quasi-quoted expression, quasi-quoted variable, int, float, string
  │ 
1 │ function(x, y) return x << y end
  │                          ^
SquidDev commented 3 years ago

Booo. Lua 5.1 is only true Lua!

I don't think we support goto/labels either - should probably do that!