In typical JS code we can see things like these:

el.on("click", function() {....});
el.myplugin({....});

The syntax noise above is obvious I think.

In principle nothing prevents us to modify JS grammar so statements
above can be rewritten as:

el.on :: "click", function() {....};
el.myplugin :: {....};

Or even this: (one token lookahead required)

el.on : "click", function() {....};
el.myplugin : {....};

So formal rule for CallExpression may look like as

CallExpression :
      MemberExpression Arguments or
      MemberExpression '::' ArgumentList

Not that much but can make it more readable.

--
Andrew Fedoniouk.

http://terrainformatica.com
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to