var should = require("should");
var parser = require('./main');

describe('Test scalar statements', function() {
  it('constants', function() {
    var ast = parser.parseEval([
      '$a = foo::ref[-5];'
    ].join('\n'), {
      parser: {
        debug: true
      }
    });
    // @todo assert console.log(ast);

  });
  it('dereferencable', function() {
    var ast = parser.parseEval([
      '$a = foo::bar()[5]->test;',
      '$b = (new test())->foo();',
      '$c = (foo())[5];',
      '$d = (function($a) { return $a * 2; })(5);',
    ].join('\n'), {
      parser: {
        debug: true
      }
    });

  });
});

@@ -233,32 +233,34 @@
 rser: %7B%0A        
+//
 debug: true%0A    
@@ -309,17 +309,16 @@
 g(ast);%0A
-%0A
   %7D);%0A  
@@ -575,16 +575,19 @@
 %0A       
+ //
  debug: 
@@ -607,16 +607,28 @@
     %7D);%0A
+    // @todo
 %0A  %7D);%0A%7D

disable debug output / todo