From 312779663fe34bf3f5a8925d6a3e0b69e87ca3c7 Mon Sep 17 00:00:00 2001 From: Djordje Ungar Date: Tue, 29 Sep 2020 12:42:24 +0200 Subject: [PATCH] Refs Issue #29: Fix the example code in readme.md --- readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index b49c890..d10c61d 100644 --- a/readme.md +++ b/readme.md @@ -23,6 +23,7 @@ Below is an example of how to use Myna from Node.JS in a single self-contained e ``` // Reference the Myna module var m = require('myna-parser'); + var delimiter = ","; // Construct a grammar object var g = new function() @@ -42,7 +43,7 @@ Below is an example of how to use Myna from Node.JS in a single self-contained e // Parse some input and print the AST var input = 'a,1,"hello"\nb,2,"goodbye"'; - console.log(parse(input)); + console.log(parser(input)); ``` Only rules that are defined with the `.ast` property will create nodes in the output parse tree. This saves the work of having to convert from a Concrete Syntax Tree (CST) to an Abstract Syntax Tree (AST).