Reto: p9-t4-peg-infix2egg

Reto: p9-t4-peg-infix2egg

Añada objetos y la notación . a su lenguaje de infijo. Algo similar a esto:

begin
  let x = { 
    c:   0,
    gc:  function() { c },
    sc:  function(value) { c = value},
    inc: function{ c =  c+1 }
  };
  print(x.c);     // 0
  print(x.gc());  // 0
  print(x.sc(5)); // 5
  print(x.gc())   // 5
end

Recursos

PEGs

Egg

PDR

Testing

Jison