projen 0.80.6 → 0.80.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +41 -41
- package/lib/awscdk/auto-discover.js +5 -5
- package/lib/awscdk/awscdk-app-java.js +1 -1
- package/lib/awscdk/awscdk-app-py.js +1 -1
- package/lib/awscdk/awscdk-app-ts.js +1 -1
- package/lib/awscdk/awscdk-construct.js +2 -2
- package/lib/awscdk/awscdk-deps-java.js +1 -1
- package/lib/awscdk/awscdk-deps-js.js +1 -1
- package/lib/awscdk/awscdk-deps-py.js +1 -1
- package/lib/awscdk/awscdk-deps.js +1 -1
- package/lib/awscdk/cdk-config.js +1 -1
- package/lib/awscdk/cdk-tasks.js +1 -1
- package/lib/awscdk/integration-test.js +1 -1
- package/lib/awscdk/lambda-extension.js +1 -1
- package/lib/awscdk/lambda-function.js +2 -2
- package/lib/build/build-workflow.js +1 -1
- package/lib/cdk/auto-discover-base.js +2 -2
- package/lib/cdk/construct-lib.js +1 -1
- package/lib/cdk/integration-test-base.js +1 -1
- package/lib/cdk/jsii-docgen.js +1 -1
- package/lib/cdk/jsii-project.js +1 -1
- package/lib/cdk8s/auto-discover.js +2 -2
- package/lib/cdk8s/cdk8s-app-py.js +1 -1
- package/lib/cdk8s/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s/cdk8s-construct.js +1 -1
- package/lib/cdk8s/cdk8s-deps-py.js +1 -1
- package/lib/cdk8s/cdk8s-deps.js +1 -1
- package/lib/cdk8s/integration-test.js +1 -1
- package/lib/cdktf/cdktf-construct.js +1 -1
- package/lib/circleci/circleci.js +1 -1
- package/lib/component.js +1 -1
- package/lib/dependencies.js +1 -1
- package/lib/dev-env.js +1 -1
- package/lib/docker-compose/docker-compose-service.js +1 -1
- package/lib/docker-compose/docker-compose.js +1 -1
- package/lib/file.js +1 -1
- package/lib/gitattributes.js +1 -1
- package/lib/github/actions-provider.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/github-credentials.js +1 -1
- package/lib/github/github-project.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/pull-request-lint.js +1 -1
- package/lib/github/stale.js +1 -1
- package/lib/github/task-workflow-job.js +1 -1
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflow-actions.js +1 -1
- package/lib/github/workflow-jobs.js +1 -1
- package/lib/github/workflow-steps.js +1 -1
- package/lib/github/workflows.js +1 -1
- package/lib/gitlab/configuration.js +1 -1
- package/lib/gitlab/gitlab-configuration.js +1 -1
- package/lib/gitlab/nested-configuration.js +1 -1
- package/lib/gitpod.js +1 -1
- package/lib/ignore-file.js +1 -1
- package/lib/ini.js +1 -1
- package/lib/java/java-project.js +1 -1
- package/lib/java/junit.js +1 -1
- package/lib/java/maven-compile.js +1 -1
- package/lib/java/maven-packaging.js +1 -1
- package/lib/java/maven-sample.js +1 -1
- package/lib/java/pom.js +1 -1
- package/lib/java/projenrc.js +1 -1
- package/lib/javascript/bundler.js +1 -1
- package/lib/javascript/eslint.js +1 -1
- package/lib/javascript/jest.js +4 -4
- package/lib/javascript/license-checker.js +1 -1
- package/lib/javascript/node-package.js +1 -1
- package/lib/javascript/node-project.js +1 -1
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/prettier.js +1 -1
- package/lib/javascript/projenrc.js +1 -1
- package/lib/javascript/typescript-config.js +2 -2
- package/lib/javascript/upgrade-dependencies.js +2 -2
- package/lib/javascript/yarnrc.js +1 -1
- package/lib/json-patch.js +1 -1
- package/lib/json.js +1 -1
- package/lib/license.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/makefile.js +1 -1
- package/lib/object-file.js +1 -1
- package/lib/project-build.js +1 -1
- package/lib/project-tree.js +1 -1
- package/lib/project.js +1 -1
- package/lib/projects.js +1 -1
- package/lib/projenrc-json.js +2 -2
- package/lib/projenrc.js +1 -1
- package/lib/python/pip.js +1 -1
- package/lib/python/poetry.d.ts +7 -3
- package/lib/python/poetry.js +43 -21
- package/lib/python/projenrc.js +1 -1
- package/lib/python/pytest-sample.js +1 -1
- package/lib/python/pytest.js +1 -1
- package/lib/python/python-project.js +1 -1
- package/lib/python/python-sample.js +1 -1
- package/lib/python/requirements-file.js +1 -1
- package/lib/python/setuppy.js +1 -1
- package/lib/python/setuptools.js +1 -1
- package/lib/python/venv.js +1 -1
- package/lib/readme.js +1 -1
- package/lib/release/publisher.js +1 -1
- package/lib/release/release-trigger.js +1 -1
- package/lib/release/release.js +1 -1
- package/lib/renovatebot.js +1 -1
- package/lib/sample-file.js +2 -2
- package/lib/semver.js +1 -1
- package/lib/source-code.js +1 -1
- package/lib/task-runtime.js +1 -1
- package/lib/task.js +1 -1
- package/lib/tasks.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/textfile.js +1 -1
- package/lib/toml.js +10 -8
- package/lib/typescript/projenrc-ts.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript/typescript-typedoc.js +1 -1
- package/lib/typescript/typescript.js +6 -6
- package/lib/version.js +2 -2
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/extensions.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/settings.js +1 -1
- package/lib/vscode/vscode.js +1 -1
- package/lib/web/next.js +3 -3
- package/lib/web/postcss.js +1 -1
- package/lib/web/react.js +4 -4
- package/lib/web/tailwind.js +1 -1
- package/lib/xmlfile.js +1 -1
- package/lib/yaml.js +1 -1
- package/node_modules/json2toml/CHANGELOG.md +128 -0
- package/node_modules/json2toml/LICENSE.txt +18 -0
- package/node_modules/json2toml/README.md +52 -0
- package/node_modules/json2toml/index.d.ts +13 -0
- package/node_modules/json2toml/index.js +160 -0
- package/node_modules/json2toml/package.json +62 -0
- package/node_modules/lodash.isdate/LICENSE +47 -0
- package/node_modules/lodash.isdate/README.md +18 -0
- package/node_modules/lodash.isdate/index.js +119 -0
- package/node_modules/lodash.isdate/package.json +17 -0
- package/node_modules/lodash.isempty/LICENSE +47 -0
- package/node_modules/lodash.isempty/README.md +18 -0
- package/node_modules/lodash.isempty/index.js +582 -0
- package/node_modules/lodash.isempty/package.json +17 -0
- package/node_modules/lodash.isplainobject/LICENSE +47 -0
- package/node_modules/lodash.isplainobject/README.md +18 -0
- package/node_modules/lodash.isplainobject/index.js +139 -0
- package/node_modules/lodash.isplainobject/package.json +17 -0
- package/node_modules/strftime/Changelog.md +286 -0
- package/node_modules/strftime/Makefile +15 -0
- package/node_modules/strftime/Readme.md +208 -0
- package/node_modules/strftime/bower.json +13 -0
- package/node_modules/strftime/component.json +16 -0
- package/node_modules/strftime/package.json +53 -0
- package/node_modules/strftime/strftime-min.js +21 -0
- package/node_modules/strftime/strftime.js +854 -0
- package/node_modules/strftime/test.js +271 -0
- package/package.json +4 -3
- package/node_modules/@iarna/toml/LICENSE +0 -14
- package/node_modules/@iarna/toml/README.md +0 -301
- package/node_modules/@iarna/toml/index.d.ts +0 -57
- package/node_modules/@iarna/toml/lib/create-date.js +0 -23
- package/node_modules/@iarna/toml/lib/create-datetime-float.js +0 -24
- package/node_modules/@iarna/toml/lib/create-datetime.js +0 -10
- package/node_modules/@iarna/toml/lib/create-time.js +0 -22
- package/node_modules/@iarna/toml/lib/format-num.js +0 -6
- package/node_modules/@iarna/toml/lib/parser-debug.js +0 -60
- package/node_modules/@iarna/toml/lib/parser.js +0 -127
- package/node_modules/@iarna/toml/lib/toml-parser.js +0 -1379
- package/node_modules/@iarna/toml/package.json +0 -82
- package/node_modules/@iarna/toml/parse-async.js +0 -30
- package/node_modules/@iarna/toml/parse-pretty-error.js +0 -33
- package/node_modules/@iarna/toml/parse-stream.js +0 -80
- package/node_modules/@iarna/toml/parse-string.js +0 -18
- package/node_modules/@iarna/toml/parse.js +0 -5
- package/node_modules/@iarna/toml/stringify.js +0 -296
- package/node_modules/@iarna/toml/toml.js +0 -3
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Transform } from "stream";
|
|
2
|
-
|
|
3
|
-
type JsonArray = boolean[] | number[] | string[] | JsonMap[] | Date[]
|
|
4
|
-
type AnyJson = boolean | number | string | JsonMap | Date | JsonArray | JsonArray[]
|
|
5
|
-
|
|
6
|
-
interface JsonMap {
|
|
7
|
-
[key: string]: AnyJson;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface ParseOptions {
|
|
11
|
-
/**
|
|
12
|
-
* The amount text to parser per pass through the event loop. Defaults to 40kb (`40000`).
|
|
13
|
-
*/
|
|
14
|
-
blocksize: number
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface FuncParse {
|
|
18
|
-
/**
|
|
19
|
-
* Synchronously parse a TOML string and return an object.
|
|
20
|
-
*/
|
|
21
|
-
(toml: string): JsonMap
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Asynchronously parse a TOML string and return a promise of the resulting object.
|
|
25
|
-
*/
|
|
26
|
-
async (toml: string, options?: ParseOptions): Promise<JsonMap>
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Given a readable stream, parse it as it feeds us data. Return a promise of the resulting object.
|
|
30
|
-
*/
|
|
31
|
-
stream (readable: NodeJS.ReadableStream): Promise<JsonMap>
|
|
32
|
-
stream (): Transform
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface FuncStringify {
|
|
36
|
-
/**
|
|
37
|
-
* Serialize an object as TOML.
|
|
38
|
-
*
|
|
39
|
-
* If an object `TOML.stringify` is serializing has a `toJSON` method
|
|
40
|
-
* then it will call it to transform the object before serializing it.
|
|
41
|
-
* This matches the behavior of JSON.stringify.
|
|
42
|
-
*
|
|
43
|
-
* The one exception to this is that `toJSON` is not called for `Date` objects
|
|
44
|
-
* because JSON represents dates as strings and TOML can represent them natively.
|
|
45
|
-
*
|
|
46
|
-
* `moment` objects are treated the same as native `Date` objects, in this respect.
|
|
47
|
-
*/
|
|
48
|
-
(obj: JsonMap): string
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Serialize a value as TOML would. This is a fragment and not a complete valid TOML document.
|
|
52
|
-
*/
|
|
53
|
-
value (any: AnyJson): string
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export const parse: FuncParse
|
|
57
|
-
export const stringify: FuncStringify
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const f = require('./format-num.js')
|
|
3
|
-
const DateTime = global.Date
|
|
4
|
-
|
|
5
|
-
class Date extends DateTime {
|
|
6
|
-
constructor (value) {
|
|
7
|
-
super(value)
|
|
8
|
-
this.isDate = true
|
|
9
|
-
}
|
|
10
|
-
toISOString () {
|
|
11
|
-
return `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}`
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
module.exports = value => {
|
|
16
|
-
const date = new Date(value)
|
|
17
|
-
/* istanbul ignore if */
|
|
18
|
-
if (isNaN(date)) {
|
|
19
|
-
throw new TypeError('Invalid Datetime')
|
|
20
|
-
} else {
|
|
21
|
-
return date
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const f = require('./format-num.js')
|
|
3
|
-
|
|
4
|
-
class FloatingDateTime extends Date {
|
|
5
|
-
constructor (value) {
|
|
6
|
-
super(value + 'Z')
|
|
7
|
-
this.isFloating = true
|
|
8
|
-
}
|
|
9
|
-
toISOString () {
|
|
10
|
-
const date = `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}`
|
|
11
|
-
const time = `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}`
|
|
12
|
-
return `${date}T${time}`
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
module.exports = value => {
|
|
17
|
-
const date = new FloatingDateTime(value)
|
|
18
|
-
/* istanbul ignore if */
|
|
19
|
-
if (isNaN(date)) {
|
|
20
|
-
throw new TypeError('Invalid Datetime')
|
|
21
|
-
} else {
|
|
22
|
-
return date
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const f = require('./format-num.js')
|
|
3
|
-
|
|
4
|
-
class Time extends Date {
|
|
5
|
-
constructor (value) {
|
|
6
|
-
super(`0000-01-01T${value}Z`)
|
|
7
|
-
this.isTime = true
|
|
8
|
-
}
|
|
9
|
-
toISOString () {
|
|
10
|
-
return `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}`
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
module.exports = value => {
|
|
15
|
-
const date = new Time(value)
|
|
16
|
-
/* istanbul ignore if */
|
|
17
|
-
if (isNaN(date)) {
|
|
18
|
-
throw new TypeError('Invalid Datetime')
|
|
19
|
-
} else {
|
|
20
|
-
return date
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const Parser = require('./parser.js')
|
|
3
|
-
const util = require('util')
|
|
4
|
-
|
|
5
|
-
const dump = _ => util.inspect(_, {colors: true, depth: 10, breakLength: Infinity})
|
|
6
|
-
class DebugParser extends Parser {
|
|
7
|
-
stateName (state) {
|
|
8
|
-
// istanbul ignore next
|
|
9
|
-
return (state.parser && state.parser.name) || state.name || ('anonymous')
|
|
10
|
-
}
|
|
11
|
-
runOne () {
|
|
12
|
-
const callStack = this.stack.concat(this.state).map(_ => this.stateName(_)).join(' <- ')
|
|
13
|
-
console.log('RUN', callStack, dump({line: this.line, col: this.col, char: this.char, ret: this.state.returned}))
|
|
14
|
-
return super.runOne()
|
|
15
|
-
}
|
|
16
|
-
finish () {
|
|
17
|
-
const obj = super.finish()
|
|
18
|
-
// istanbul ignore if
|
|
19
|
-
if (this.stack.length !== 0) {
|
|
20
|
-
throw new Parser.Error('All states did not return by end of stream')
|
|
21
|
-
}
|
|
22
|
-
return obj
|
|
23
|
-
}
|
|
24
|
-
callStack () {
|
|
25
|
-
const callStack = this.stack.map(_ => this.stateName(_)).join(' ').replace(/\S/g, ' ')
|
|
26
|
-
return callStack ? callStack + ' ' : ''
|
|
27
|
-
}
|
|
28
|
-
next (fn) {
|
|
29
|
-
console.log(' ', this.callStack(), 'NEXT', this.stateName(fn))
|
|
30
|
-
return super.next(fn)
|
|
31
|
-
}
|
|
32
|
-
goto (fn) {
|
|
33
|
-
console.log(' ', this.callStack(), 'GOTO', this.stateName(fn))
|
|
34
|
-
super.next(fn)
|
|
35
|
-
return false
|
|
36
|
-
}
|
|
37
|
-
call (fn, returnWith) {
|
|
38
|
-
console.log(' ', this.callStack(), 'CALL', fn.name, returnWith ? '-> ' + returnWith.name : '')
|
|
39
|
-
if (returnWith) super.next(returnWith)
|
|
40
|
-
this.stack.push(this.state)
|
|
41
|
-
this.state = {parser: fn, buf: '', returned: null}
|
|
42
|
-
}
|
|
43
|
-
callNow (fn, returnWith) {
|
|
44
|
-
console.log(' ', this.callStack(), 'CALLNOW', fn.name, returnWith ? '-> ' + returnWith.name : '')
|
|
45
|
-
if (returnWith) super.next(returnWith)
|
|
46
|
-
this.stack.push(this.state)
|
|
47
|
-
this.state = {parser: fn, buf: '', returned: null}
|
|
48
|
-
return false
|
|
49
|
-
}
|
|
50
|
-
return (value) {
|
|
51
|
-
console.log(' ', this.callStack(), 'RETURN')
|
|
52
|
-
return super.return(value)
|
|
53
|
-
}
|
|
54
|
-
returnNow (value) {
|
|
55
|
-
console.log(' ', this.callStack(), 'RETURNNOW')
|
|
56
|
-
super.return(value)
|
|
57
|
-
return false
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
module.exports = DebugParser
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const ParserEND = 0x110000
|
|
3
|
-
class ParserError extends Error {
|
|
4
|
-
/* istanbul ignore next */
|
|
5
|
-
constructor (msg, filename, linenumber) {
|
|
6
|
-
super('[ParserError] ' + msg, filename, linenumber)
|
|
7
|
-
this.name = 'ParserError'
|
|
8
|
-
this.code = 'ParserError'
|
|
9
|
-
if (Error.captureStackTrace) Error.captureStackTrace(this, ParserError)
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
class State {
|
|
13
|
-
constructor (parser) {
|
|
14
|
-
this.parser = parser
|
|
15
|
-
this.buf = ''
|
|
16
|
-
this.returned = null
|
|
17
|
-
this.result = null
|
|
18
|
-
this.resultTable = null
|
|
19
|
-
this.resultArr = null
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
class Parser {
|
|
23
|
-
constructor () {
|
|
24
|
-
this.pos = 0
|
|
25
|
-
this.col = 0
|
|
26
|
-
this.line = 0
|
|
27
|
-
this.obj = {}
|
|
28
|
-
this.ctx = this.obj
|
|
29
|
-
this.stack = []
|
|
30
|
-
this._buf = ''
|
|
31
|
-
this.char = null
|
|
32
|
-
this.ii = 0
|
|
33
|
-
this.state = new State(this.parseStart)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
parse (str) {
|
|
37
|
-
/* istanbul ignore next */
|
|
38
|
-
if (str.length === 0 || str.length == null) return
|
|
39
|
-
|
|
40
|
-
this._buf = String(str)
|
|
41
|
-
this.ii = -1
|
|
42
|
-
this.char = -1
|
|
43
|
-
let getNext
|
|
44
|
-
while (getNext === false || this.nextChar()) {
|
|
45
|
-
getNext = this.runOne()
|
|
46
|
-
}
|
|
47
|
-
this._buf = null
|
|
48
|
-
}
|
|
49
|
-
nextChar () {
|
|
50
|
-
if (this.char === 0x0A) {
|
|
51
|
-
++this.line
|
|
52
|
-
this.col = -1
|
|
53
|
-
}
|
|
54
|
-
++this.ii
|
|
55
|
-
this.char = this._buf.codePointAt(this.ii)
|
|
56
|
-
++this.pos
|
|
57
|
-
++this.col
|
|
58
|
-
return this.haveBuffer()
|
|
59
|
-
}
|
|
60
|
-
haveBuffer () {
|
|
61
|
-
return this.ii < this._buf.length
|
|
62
|
-
}
|
|
63
|
-
runOne () {
|
|
64
|
-
return this.state.parser.call(this, this.state.returned)
|
|
65
|
-
}
|
|
66
|
-
finish () {
|
|
67
|
-
this.char = ParserEND
|
|
68
|
-
let last
|
|
69
|
-
do {
|
|
70
|
-
last = this.state.parser
|
|
71
|
-
this.runOne()
|
|
72
|
-
} while (this.state.parser !== last)
|
|
73
|
-
|
|
74
|
-
this.ctx = null
|
|
75
|
-
this.state = null
|
|
76
|
-
this._buf = null
|
|
77
|
-
|
|
78
|
-
return this.obj
|
|
79
|
-
}
|
|
80
|
-
next (fn) {
|
|
81
|
-
/* istanbul ignore next */
|
|
82
|
-
if (typeof fn !== 'function') throw new ParserError('Tried to set state to non-existent state: ' + JSON.stringify(fn))
|
|
83
|
-
this.state.parser = fn
|
|
84
|
-
}
|
|
85
|
-
goto (fn) {
|
|
86
|
-
this.next(fn)
|
|
87
|
-
return this.runOne()
|
|
88
|
-
}
|
|
89
|
-
call (fn, returnWith) {
|
|
90
|
-
if (returnWith) this.next(returnWith)
|
|
91
|
-
this.stack.push(this.state)
|
|
92
|
-
this.state = new State(fn)
|
|
93
|
-
}
|
|
94
|
-
callNow (fn, returnWith) {
|
|
95
|
-
this.call(fn, returnWith)
|
|
96
|
-
return this.runOne()
|
|
97
|
-
}
|
|
98
|
-
return (value) {
|
|
99
|
-
/* istanbul ignore next */
|
|
100
|
-
if (this.stack.length === 0) throw this.error(new ParserError('Stack underflow'))
|
|
101
|
-
if (value === undefined) value = this.state.buf
|
|
102
|
-
this.state = this.stack.pop()
|
|
103
|
-
this.state.returned = value
|
|
104
|
-
}
|
|
105
|
-
returnNow (value) {
|
|
106
|
-
this.return(value)
|
|
107
|
-
return this.runOne()
|
|
108
|
-
}
|
|
109
|
-
consume () {
|
|
110
|
-
/* istanbul ignore next */
|
|
111
|
-
if (this.char === ParserEND) throw this.error(new ParserError('Unexpected end-of-buffer'))
|
|
112
|
-
this.state.buf += this._buf[this.ii]
|
|
113
|
-
}
|
|
114
|
-
error (err) {
|
|
115
|
-
err.line = this.line
|
|
116
|
-
err.col = this.col
|
|
117
|
-
err.pos = this.pos
|
|
118
|
-
return err
|
|
119
|
-
}
|
|
120
|
-
/* istanbul ignore next */
|
|
121
|
-
parseStart () {
|
|
122
|
-
throw new ParserError('Must declare a parseStart method')
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
Parser.END = ParserEND
|
|
126
|
-
Parser.Error = ParserError
|
|
127
|
-
module.exports = Parser
|