discret 0.6.2

A backend to create peer to peer (P2P) applications, using a GraphQL inspired syntax
Documentation
/*
    mutation mutationName{


    friend {
    id : $id
    name: "name" //update name
    truc: {id:$idtruc}
    atruc: [{id:$id}, {name:"qdqs"}] //add $idtruc and create name then add it
    }
    }
    }
*/
WHITESPACE = _{ " " | "\t" | "\r" | "\n" }
COMMENT    = _{ "//" ~ (!NEWLINE ~ ANY)* ~ NEWLINE }

identifier       = @{ (LETTER | NUMBER | "_")+ }
namespace_entity = @{ (LETTER | NUMBER | "_" | ".")+ }

variable = @{ "$" ~ identifier }
comma    =  { "," }

mutation      = { SOI ~ mutation_name ~ "{" ~ entity+ ~ "}" ~ EOI }
mutation_name = { "mutate" ~ (identifier)? }

entity      = { entity_name ~ "{" ~ field* ~ "}" }
entity_name = { namespace_entity ~ (":" ~ namespace_entity)? }

field = { identifier ~ ":" ~ value }

value = { variable | entity_ref | entity_array | string | float | integer | boolean | null }

entity_ref   = { "{" ~ field+ ~ "}" }
entity_array = { "[" ~ entity_ref ~ (comma ~ entity_ref)* ~ comma? ~ "]" }

string = ${ "\"" ~ inner ~ "\"" }
inner  = @{ char* }
char   =  {
    !("\"" | "\\") ~ ANY
  | "\\" ~ ("\"" | "\\" | "/" | "b" | "f" | "n" | "r" | "t")
  | "\\" ~ ("u" ~ ASCII_HEX_DIGIT{4})
}

float = @{
    "-"? ~ ("0" | ASCII_NONZERO_DIGIT ~ ASCII_DIGIT*) ~ ("." ~ ASCII_DIGIT*) ~ (^"e" ~ ("+" | "-")? ~ ASCII_DIGIT+)?
}

integer = @{
    "-"? ~ ASCII_DIGIT+
}
boolean =  { ^"true" | ^"false" }
null    =  { ^"null" }