2014-07-22 16:43:18 +00:00
|
|
|
local s = sexpr(Local("a", Prop), Local("b", Prop))
|
2014-07-07 17:45:19 +00:00
|
|
|
print(s)
|
|
|
|
local a, b = s:fields()
|
|
|
|
print(a)
|
|
|
|
print(b)
|
2014-07-22 16:43:18 +00:00
|
|
|
assert(a ~= Local("a", Prop))
|
|
|
|
assert(a:to_external() == Local("a", Prop))
|
|
|
|
assert(a:fields() == Local("a", Prop))
|
2014-07-07 17:45:19 +00:00
|
|
|
assert(is_expr(a:to_external()))
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
local s = sexpr(Local("a", Prop), Local("b", Prop))
|
2014-07-07 17:45:19 +00:00
|
|
|
local s = sexpr({})
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
local s1 = sexpr(Local("a", Prop), Local("b", Prop))
|
|
|
|
local s2 = sexpr(Local("a", Prop), Local("c", Prop))
|
|
|
|
assert(Local("b", Prop) > Local("c", Prop))
|
2014-07-07 17:45:19 +00:00
|
|
|
assert(s1 > s2)
|
|
|
|
assert(s2 < s1)
|
2014-07-22 16:43:18 +00:00
|
|
|
assert(s2 == sexpr(Local("a", Prop), Local("c", Prop)))
|
2014-07-07 17:45:19 +00:00
|
|
|
|