Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 899 Bytes

README.md

File metadata and controls

32 lines (27 loc) · 899 Bytes

JsonMacro

A simple language that compiles to a JSON object whose syntax is a derivated of the one used by JSON logic.

This project aims at creating a set of tools to make your users code and to execute their custom scripts safely.

TODO

Compiler

  • Number
  • String
  • Array
  • Variable and function
  • If X then Y else Z
  • NOT operator
  • For each X in Y do Z
  • True / False / None
  • IN operator
  • Handle signed expression like a = -(1+2)
  • While X do Y
  • All X in Y verify Z
  • Some X in Y verify Z
  • Array element getter
  • Computed array elements
  • Escape characters in strings

Code editor

Using http://codemirror.net/

  • Syntax highlighting (in progress)
  • Auto-completion

Interpreter

  • A JavaScript interpreter that executes compiled JsonMacro