|
|
|
@ -2,10 +2,9 @@ import { locate } from 'locate-character';
|
|
|
|
import get_code_frame from './get_code_frame.js';
|
|
|
|
import get_code_frame from './get_code_frame.js';
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @extends Error
|
|
|
|
* @extends Error
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class CompileError extends Error {
|
|
|
|
class CompileError extends Error {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @type {string}
|
|
|
|
* @type {string}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ -65,7 +64,3 @@ export default function error(message, props) {
|
|
|
|
error.frame = get_code_frame(props.source, start.line - 1, start.column);
|
|
|
|
error.frame = get_code_frame(props.source, start.line - 1, start.column);
|
|
|
|
throw error;
|
|
|
|
throw error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|