Skip to content

QuoteToken (EN)

bhsd edited this page Jan 3, 2024 · 16 revisions

Other Languages

Introduction

Single quotes (italic or bold).

✅ Available in the Mini and Browser versions.

Methods

lint

✅ Expand

returns: LintError[]
Report potential grammar errors.

// lint
var {lastChild} = Parser.parse("''''");
assert.equal(lastChild, "'''");
assert.deepStrictEqual(lastChild.lint(), [
	{
		severity: 'error',
		message: `lonely "'"`,
		startLine: 0,
		startCol: 0,
		startIndex: 0,
		endLine: 0,
		endCol: 1,
		endIndex: 1,
		excerpt: "''''",
	},
])

cloneNode

Expand

returns: this
Deep clone the node.

// cloneNode
var {firstChild} = Parser.parse("''");
assert.deepStrictEqual(firstChild.cloneNode(), firstChild);
Clone this wiki locally