Skip to content

Commit 390a1dc

Browse files
committed
Rewrite all the things
1 parent c35ccd2 commit 390a1dc

13 files changed

+614
-487
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
parser.js
1+
/node_modules/

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ node_js:
88
- "5"
99
- "6"
1010
- "7"
11+
- "8"
1112
- "node"
1213
script:
1314
- "npm test"

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
C. Scott Ananian <[email protected]> (http://cscott.net)
22
Kyle E. Mitchell <[email protected]> (https://kemitchell.com)
33
Shinnosuke Watanabe <[email protected]>
4+
Antoine Motet <[email protected]>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This package parses SPDX license expression strings describing license terms, like [package.json license strings](https://docs.npmjs.com/files/package.json#license), into consistently structured ECMAScript objects. The npm command-line interface depends on this package, as do many automatic license-audit tools.
1+
This package parses [SPDX license expression](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60) strings describing license terms, like [package.json license strings](https://docs.npmjs.com/files/package.json#license), into consistently structured ECMAScript objects. The npm command-line interface depends on this package, as do many automatic license-audit tools.
22

33
In a nutshell:
44

index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
var Scanner = require('./scanner')
2-
var Parser = require('./parser').Parser
1+
var scan = require('./scan')
2+
var parse = require('./parse')
33

4-
module.exports = function (string) {
5-
var parser = new Parser()
6-
parser.lexer = new Scanner()
7-
return parser.parse(string)
4+
module.exports = function (source) {
5+
return parse(scan(source))
86
}

0 commit comments

Comments
 (0)