1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-28 17:19:31 +00:00

Remove ~, ~?, and @ operators and replace with function calls

This commit is contained in:
Étienne Fildadut 2024-01-02 00:34:30 +01:00
parent 7635261a3f
commit e71096cab7
14 changed files with 65 additions and 99 deletions

View file

@ -31,7 +31,6 @@ local common = {
regular_operators = {
prefixes = {
{ ">", 3.1 }, -- just above _=_
{ "~", 3.5 }, -- just below _~_ so else-if (~ condition ~ expression) parses as (~ (condition ~ expression))
{ "!", 11 },
{ "-", 11 },
{ "*", 11 },
@ -44,7 +43,6 @@ local common = {
infixes = {
{ ";", 1 },
{ "#", 2 }, { "->", 2 },
{ "~", 4 }, { "~?", 4 },
{ "|>", 5 }, { "&", 5 }, { "|", 5 },
{ "==", 7 }, { "!=", 7 }, { ">=", 7 }, { "<=", 7 }, { "<", 7 }, { ">", 7 },
{ "+", 8 }, { "-", 8 },
@ -58,8 +56,7 @@ local common = {
-- list of all operators and their priority
operator_priority = {
[";_"] = 1,
["$_"] = 1,
["@_"] = 1,
["$_"] = 2,
["_,_"] = 2,
["_=_"] = 3,
["_!_"] = 12,