Vague Language
Quick Start
vague
schema Invoice {
id: unique int in 1000..9999,
status: "draft" | "sent" | "paid",
total: decimal in 100.00..5000.00,
line_items: 1..5 of LineItem,
tax: round(total * 0.2, 2),
assume total > 0
}
dataset TestData {
invoices: 100 of Invoice
}
Core Syntax
- •Types:
string,int,decimal,boolean,date - •Superposition:
"a" | "b"or weighted0.7: "a" | 0.3: "b" - •Ranges:
int in 1..100,date in 2020..2024 - •Collections:
1..5 of Itemor100 of Item - •Let bindings:
let statuses = "active" | "pending"(reusable values) - •Computed:
total: sum(items.amount),median(),first(),last(),product() - •Constraints:
assume due_date >= issued_date - •Refine:
} refine { if type == "A" { field: int in 1..10 } } - •Match:
match status { "a" => "Alpha", "b" => "Beta" } - •References:
any of companies where .active == true - •Parent ref:
= ^parent_field - •Nullable:
string?orstring | null - •Unique:
id: unique int in 1..1000 - •Private:
age: private int(generated but excluded from output) - •Ordered:
[48, 52, 55, 60](cycles through values) - •Conditional:
field: string when condition(field only exists if condition is true)
Reference Files
- •references/syntax.md - Complete syntax
- •references/functions.md - Built-in functions
- •references/plugins.md - All plugins (Faker, Issuer, Regex, Date, HTTP, SQL, GraphQL)
- •references/cli.md - CLI usage