UNPKG

llparse

Version:

[![Build Status](https://secure.travis-ci.org/indutny/llparse.svg)](http://travis-ci.org/indutny/llparse) [![NPM version](https://badge.fury.io/js/llparse.svg)](https://badge.fury.io/js/llparse)

24 lines (17 loc) 462 B
'use strict'; const node = require('./'); const llparse = require('../'); const kNoAdvance = llparse.symbols.kNoAdvance; const kCode = Symbol('code'); const kReason = Symbol('reason'); class Error extends node.Node { constructor(code, reason) { super('error'); this[kCode] = code; this[kReason] = reason; this[kNoAdvance] = true; } get code() { return this[kCode]; } get reason() { return this[kReason]; } } module.exports = Error;