mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Fix + operator overloading
This commit is contained in:
parent
ec18d2e611
commit
9028970440
3 changed files with 14 additions and 12 deletions
10
anselme.lua
10
anselme.lua
|
|
@ -7,11 +7,11 @@ local anselme = {
|
|||
}
|
||||
package.loaded[...] = anselme
|
||||
|
||||
-- TODO: for type checking functions:
|
||||
-- pour éliminer totalement les undefined
|
||||
-- ne type checker/compiler les fonctions que lorsqu'elles sont apppelées, en déterminant leur type à ce moment là selon les arguments donnés
|
||||
-- (du coup la surcharge ne se fera que selon l'arité. Mais ça sera 100% type checké)
|
||||
-- PB: les listes ont des types mixés (cf les varargs) + afficher des warnings dans le selecteur de variante lorsqu'un type de retour manque
|
||||
-- TODO: improve type checking.
|
||||
-- Right now, there is some basic type checking done at parsing - but since Lua and Anselme functions may not always define the type of
|
||||
-- their parameters and return value, a lot of checks are skipped ("undefined argument" type).
|
||||
-- Probably won't be able to remove them completely (since lists can have mixed types, etc.), but would be good to limit them.
|
||||
-- Ideally, we'd avoid runtime type checking.
|
||||
|
||||
-- load libs
|
||||
local preparse = require((...):gsub("anselme$", "parser.preparser"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue