mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 09:09:31 +00:00
Add variable constraints, rename type annotation checks to constraints, rename custom type to annotation
This commit is contained in:
parent
92a496e584
commit
3e658e4780
16 changed files with 237 additions and 118 deletions
14
test/tests/constrained variable definition.lua
Normal file
14
test/tests/constrained variable definition.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={text="5::kg",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[2]={"error","constraint check failed; while assigning value to variable \"constrained variable definition.not weigh\"; at test/tests/constrained variable definition.ans:7"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "5::kg"
|
||||
} } }
|
||||
{ "error", 'constraint check failed; while assigning value to variable "constrained variable definition.not weigh"; at test/tests/constrained variable definition.ans:7' }
|
||||
]]--
|
||||
Loading…
Add table
Add a link
Reference in a new issue