module liquid.eval.value

Code Map

module liquid.eval.value;


//! Use the IR visitor Sink.
alias Sink = ir.Sink;

class Value
{
public:
	this() { }
	fn ident(n: ir.Node, key: string) Value { }
	fn toText(n: ir.Node, sink: scope (Sink)) { }
	fn toArray(n: ir.Node) Value[] { }
	fn toBool(n: ir.Node) bool { }
	fn toSize(n: ir.Node) Value { }
	fn opEquals(other: Value) bool { }
	fn opIndex(other: Value) Value { }
	fn contains(other: Value) bool { }
	fn opCmp(other: Value) i32 { }
}

class Nil : Value
{
public:
	this() { }
	fn toBool(n: ir.Node) bool { }
	fn opEquals(other: Value) bool { }
}

class Number : Value
{
public:
	value: f64;
	integer: bool;


public:
	this(value: f64, integer: bool) { }
	fn toText(n: ir.Node, sink: scope (Sink)) { }
	fn opEquals(other: Value) bool { }
	fn opCmp(otherVal: Value) i32 { }
}

class Bool : Value
{
public:
	value: bool;


public:
	this(value: bool) { }
	fn toText(n: ir.Node, sink: scope (Sink)) { }
	fn toBool(n: ir.Node) bool { }
	fn opEquals(other: Value) bool { }
}

class Text : Value
{
public:
	text: string;


public:
	this(text: string) { }
	fn toText(n: ir.Node, sink: scope (Sink)) { }
	fn toBool(n: ir.Node) bool { }
	fn toSize(n: ir.Node) Value { }
	fn opEquals(other: Value) bool { }
	fn contains(otherVal: Value) bool { }
}

class Array : Value
{
public:
	vals: Value[];


public:
	this(vals: Value[]) { }
	fn toArray(n: ir.Node) Value[] { }
	fn toSize(n: ir.Node) Value { }
	fn ident(n: ir.Node, key: string) Value { }
	fn contains(other: Value) bool { }
	fn opIndex(index: Value) Value { }
}

class Set : Value
{
public:
	parent: Set;
	ctx: Value[string];


public:
	this() { }
	this(parent: Set) { }
	fn ident(n: ir.Node, key: string) Value { }
}
alias Sink

Use the IR visitor Sink.