diff --git a/README.md b/README.md index a839f7275..201d97591 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,10 @@ Usage ```js // initialize the php parser factory class +var fs = require('fs'); +var path = require('path'); var engine = require('php-parser'); + // initialize a new parser instance var parser = new engine({ // some options : @@ -35,12 +38,19 @@ var parser = new engine({ }); // Retrieve the AST from the specified source -var AST = parser.parseEval('echo "Hello World";'); -// AST.kind === 'program'; -// AST.children[0].kind === 'echo'; +var eval = parser.parseEval('echo "Hello World";'); // Retrieve an array of tokens (same as php function token_get_all) var tokens = parser.tokenGetAll('