use crate::parser::{parse_syntax, parse_syntax_with_standard, Parser};
use crate::standard::VHDLStandard;
pub fn to_test_text(func: impl FnOnce(&mut Parser), input: &str) -> String {
let (entity, diagnostics) = parse_syntax(input, func);
assert!(diagnostics.is_empty(), "got diagnostics: {:?}", diagnostics);
entity.test_text()
}
pub fn to_test_text_with_standard(
standard: VHDLStandard,
func: impl FnOnce(&mut Parser),
input: &str,
) -> String {
let (entity, diagnostics) = parse_syntax_with_standard(standard, input.bytes(), func);
assert!(diagnostics.is_empty(), "got diagnostics: {:?}", diagnostics);
entity.test_text()
}