Last active
August 29, 2015 14:05
-
-
Save refractalize/f4c5ae9d932b95a75097 to your computer and use it in GitHub Desktop.
coniq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = integer | |
b = a + 1 | |
" this is the start of something new {b} = {a} + 1, always | |
c = object { | |
x = integer | |
y = 4 | |
z = x + y | |
} | |
" {c.x} is an integer, and so is {c.y}, but only {c.x} can be edited. The result of x + y is {c.z}. | |
people = list [ | |
object { | |
name = text (label = 'Name') | |
address = text (label = 'Address') | |
} | |
] | |
" you can have a table of people: | |
" {people} | |
" you can also have lists, like a list of people: | |
{ | |
p in people | |
" each person can be rendered | |
with their name: {p.name}, and address: {p.address} | |
and can be deleted {p.delete!} | |
} | |
" or even tables: | |
| Name | Address | | |
{ | |
p in people { | |
" | {p.name} | {p.address} | [remove]{p.remove!} | | |
} add { | |
" | {p.name} | {p.address} | [add]{p.add!} | | |
} none { | |
" none | |
} | |
} | |
" or even in unordered lists: | |
{ | |
p in people { | |
" * {p.name} | |
} | |
} | |
" you can have conditions: | |
ocean = object { | |
big = boolean | |
name = text | |
} | |
" this ocean is {ocean.big} { | |
if ocean.big { | |
" the big {ocean.name} | |
} else { | |
" the small {ocean.name} | |
} | |
} | |
" or even a combination of lists and conditions: | |
{ | |
p in people { | |
if p.name == 'bob' { | |
" this is bob | |
} else { | |
" this isn't bob | |
} | |
} | |
} | |
" you can put new fields in brackets { x = integer | " {x}, {x + 1} } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment