@rightcapital/phpdoc-parser
Version:
TypeScript version of PHPDoc parser with support for intersection types and generics
30 lines (29 loc) • 944 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidTypeNode = void 0;
const parser_exception_1 = require("../../parser/parser-exception");
const type_node_1 = require("./type-node");
class InvalidTypeNode extends type_node_1.TypeNode {
constructor(exception) {
super();
this.exception = exception;
this.exceptionArgs = [
exception.getCurrentTokenValue(),
exception.getCurrentTokenType(),
exception.getCurrentOffset(),
exception.getExpectedTokenType(),
exception.getExpectedTokenValue(),
exception.getCurrentTokenLine(),
];
}
getException() {
return new parser_exception_1.ParserException(...this.exceptionArgs);
}
toString() {
return '*Invalid type*';
}
getNodeType() {
return 'InvalidTypeNode';
}
}
exports.InvalidTypeNode = InvalidTypeNode;