Skip to content

Commit

Permalink
Use tokenise in README consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
mwilliamson committed Aug 25, 2012
1 parent 3093f48 commit 6d7984f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -119,8 +119,8 @@ The main advantage of using `lop.Token` is that you can then use the rules `lop.
To parse an array of tokens, you can call the method `parseTokens` on `lop.Parser`, passing in the parsing rule and the array of tokens. For instance, assuming we already have a `tokenise` function (the one above would do fine):

```javascript
function parseSentence(inputString) {
var tokens = tokenise(inputString);
function parseSentence(source) {
var tokens = tokenise(source);
var parser = new lop.Parser();
var parseResult = parser.parseTokens(sentenceRule, tokens);
if (!parseResult.isSuccess()) {
Expand Down

0 comments on commit 6d7984f

Please sign in to comment.