2019-04-11 15:23:14 -07:00
|
|
|
use crate::common::*;
|
2018-10-13 03:12:35 -07:00
|
|
|
|
2019-09-21 15:35:03 -07:00
|
|
|
pub(crate) fn compile(text: &str) {
|
2018-10-13 06:38:44 -07:00
|
|
|
if let Err(error) = Parser::parse(text) {
|
2018-12-08 14:29:41 -08:00
|
|
|
if let CompilationErrorKind::Internal { .. } = error.kind {
|
2018-10-13 06:38:44 -07:00
|
|
|
panic!("{}", error)
|
|
|
|
}
|
|
|
|
}
|
2018-10-13 03:12:35 -07:00
|
|
|
}
|