Count labels in properties.

We'll piggyback on the tracing capabilities of the VM to provide labelling for prop tests. To ensure we do not interfere with normal traces, we only count traces that starts with a NUL byte as label. That convention is assumed to be known of the companion fuzz library that should then provide the labelling capabilities as a dedicated function.
This commit is contained in:
KtorZ
2024-03-09 00:30:30 +01:00
parent d6cc9bdfbe
commit 96da70149d
2 changed files with 93 additions and 19 deletions

View File

@@ -1,13 +1,12 @@
use chumsky::prelude::*;
use num_bigint::BigInt;
use ordinal::Ordinal;
use super::{
error::ParseError,
extra::ModuleExtra,
token::{Base, Token},
};
use crate::ast::Span;
use chumsky::prelude::*;
use num_bigint::BigInt;
use ordinal::Ordinal;
pub struct LexInfo {
pub tokens: Vec<(Token, Span)>,
@@ -199,7 +198,8 @@ pub fn lexer() -> impl Parser<char, Vec<(Token, Span)>, Error = ParseError> {
.or(just('"'))
.or(just('n').to('\n'))
.or(just('r').to('\r'))
.or(just('t').to('\t')),
.or(just('t').to('\t'))
.or(just('0').to('\0')),
);
let string = just('@')