Skip to content

Planned CCL API

Iconmaster edited this page Feb 6, 2019 · 5 revisions

CCL is Iconus's input format and scripting language.

stdlib - Standard library

Field manipulation

Selectors

  • get
  • set!
  • has?
  • read-only?
  • fields
  • field-names
  • field-values
  • keys
  • values

Mutable collection (list, map, etc.) manipulation

Constructors

  • add
  • add-all
  • del-key
  • del-val
  • del-keys
  • del-vals
  • concat
  • slice

Mutators

  • clear!
  • add!
  • add-all!
  • del-key!
  • del-val!
  • del-keys!
  • del-vals!

Transformers

  • each, each!, each/pair, each!/pair
  • filter, filter!, filter/pair, filter!/pair
  • count, count!, count/pair, count!/pair

Variable manipulation

  • local
  • global

Misc. functions

  • ==
  • !=
  • echo

<nil> - Nil

<bool> - Boolean

  • bool

<number> - Double-precision floating point number

<string> - Null-terminated string

<list> - Basic list

Constructors

  • list
  • >list
  • range

Selectors

  • head
  • tail
  • behead
  • curtail

Mutators

  • behead!
  • curtail!

<map> - Basic hash-map

Constructors

  • map
  • >map
  • partition, partition/pair

<function> - Functions

  • apply

<class> - Classes

  • get-class
  • is?
  • to

filesystem - Accessing the server's filesystem

<file> - Paths and files

  • ls: Returns a list of files.
  • cat: Returns a str/raw by default, or something else if a correct cat handler is defined.

<str/raw> - Output of calls to cat

<image> - Images

os - OS integration

Executing commands

  • system - calls out to an OS binary

<sys-out> - Output of system calls

Clone this wiki locally