mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
[stdlib] add is typed
This commit is contained in:
parent
02fa9d075d
commit
3ba67b839f
1 changed files with 7 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
local ast = require("anselme.ast")
|
local ast = require("anselme.ast")
|
||||||
local ArgumentTuple, String, Typed = ast.ArgumentTuple, ast.String, ast.Typed
|
local ArgumentTuple, String, Typed, Boolean = ast.ArgumentTuple, ast.String, ast.Typed, ast.Boolean
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
|
|
@ -14,6 +14,12 @@ return {
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"is typed", "(value)",
|
||||||
|
function(state, v)
|
||||||
|
return Boolean:new(v.type == "typed")
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type", "(value)",
|
"type", "(value)",
|
||||||
function(state, v)
|
function(state, v)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue