@desertnet/scanner
Advanced tools
Comparing version
"use strict" | ||
module.exports = require('./dist/es5/Scanner.js').default | ||
module.exports.Token = require('./dist/es5/Token.js').default |
{ | ||
"name": "@desertnet/scanner", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "A regex-based string scanner/tokenizer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -140,6 +140,8 @@ # scanner | ||
### Token | ||
### new Scanner.Token(type, value, index, line, column) | ||
Instances of the `Token` class cannot be instantiated directly. Instead, they are returned to you by `scanner.nextToken()`. They have the following readable properties: | ||
Generally, instances of the `Token` class should not be instantiated directly. However the constructor is publicly available as it can be convenient to instantiate your own in tests. | ||
In typical usage, they are returned to you by `scanner.nextToken()`. They have the following readable properties: | ||
- `type`: The name of the token type. (A string.) | ||
@@ -146,0 +148,0 @@ - `value`: The matching substring from the input. |
65718
0.36%996
0.1%151
1.34%