@toml-tools/lexer
Advanced tools
Comparing version 0.1.1 to 0.2.0
const { Lexer } = require("chevrotain"); | ||
const { tokensArray, tokensDictionary } = require("./tokens"); | ||
const tomlLexer = new Lexer(tokensArray, { ensureOptimizations: true }); | ||
const tomlLexer = new Lexer(tokensArray, { | ||
// Reducing the amount of position tracking can provide a small performance boost (<10%) | ||
// Likely best to keep the full info for better error position reporting and | ||
// to expose "fuller" ITokens from the Lexer. | ||
positionTracking: "full", | ||
ensureOptimizations: true, | ||
// Both TOML lineTerminators contain a "\n" | ||
// The "lineTerminatorCharacters" parameter is only used to flag patterns that **may** | ||
// contain line terminators, so this is still correct. | ||
lineTerminatorCharacters: ["\n"], | ||
lineTerminatorsPattern: /\n|\r\n/g | ||
}); | ||
function tokenize(text) { | ||
@@ -7,0 +19,0 @@ return tomlLexer.tokenize(text); |
{ | ||
"name": "@toml-tools/lexer", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "TOML Lexer Implemented in JavaScript", | ||
"main": "lib/api.js", | ||
"repository": "https://github.com/bd82/toml-tools/packages/lexer", | ||
"repository": "https://github.com/bd82/toml-tools/tree/master/packages/lexer", | ||
"license": "MIT", | ||
@@ -12,8 +12,9 @@ "dependencies": { | ||
"scripts": { | ||
"test": "echo TBD" | ||
"test": "mocha ./test/*spec.js" | ||
}, | ||
"typings": "./api.d.ts", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "985568629950665054ac56fd2601d465cb9aa716" | ||
"gitHead": "229fd640c1874e99ee65ce80887169f3aa5787e9" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
11108
7
288
0
43