Code coverage report for src/ast/error.js

Statements: 100% (9 / 9)      Branches: 100% (0 / 0)      Functions: 100% (1 / 1)      Lines: 100% (9 / 9)      Ignored: none     

All files » src/ast/ » error.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29            1 1                       1 52 52 52 52 52     1  
/*!
 * Copyright (C) 2017 Glayzzle (BSD3 License)
 * @authors https://github.com/glayzzle/php-parser/graphs/contributors
 * @url http://glayzzle.com
 */
 
var Node = require('./node');
var KIND = 'error';
 
 
/**
 * Defines an error node (used only on silentMode)
 * @constructor Error
 * @extends {Node}
 * @property {string} message
 * @property {number} line
 * @property {number|string} token
 * @property {string|array} expected
 */
var Error = Node.extends(function Error(message, token, line, expected, location) {
  Node.apply(this, [KIND, location]);
  this.message = message;
  this.token = token;
  this.line = line;
  this.expected = expected;
});
 
module.exports = Error;