Skip to content

A simple language that compiles to a JSON object

Notifications You must be signed in to change notification settings

etiennecrb/jsonmacro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple language that compiles to a JSON object

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published