Closed pwhelan closed 10 years ago
That is more or less what I was doing before. This code works fine on the website with try but not with the compiled version I have.
Code:
{{
require 'goutte.phar'
client = new Goutte\Client
crawler = client.request('GET', 'http://example.com')
crawler.filter('button.select')
}}
Generated code (website):
<?php
require 'goutte.phar';
$client = new Goutte\Client();
$crawler = $client->request('GET', 'http://example.com');
$crawler->filter('button.select');
?>
Local version:
<?php
require 'goutte.phar';
$client = new Goutte\Client();
$crawler = ('GET', 'http://example.com');
('button.select');
?>
This seems to be an between master and v0.2.3 (v0.2.3 works perfectly).
The error must be somewhere in parser.pegjs in here: https://github.com/btwael/mammouth/compare/v0.2.3...master
@pwhelan, please use npm version, it works perfectly. we are working in a new better version.
I checked out the v0.2.3 tag and everything works fine.
A new mammouth version http://mammouth.wamalaka.com/
I was unable to invoke methods on an instance of a class.
Example:
I would expect bar.Bar to execute the Bar method of the Foo class. I was unable to find out how to do this in the documentation.