allow up to 65536 parser events
parser events don't take up enough memory to warrant a stricter limit. I do wonder if this limit is actually reachable with a 65536 character limit though.
This commit is contained in:
parent
5e6b84bed5
commit
d309211558
|
@ -37,6 +37,9 @@ enum EventKind {
|
||||||
Advance,
|
Advance,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We don't want events taking up too much memory all of a sudden.
|
||||||
|
const _: () = assert!(size_of::<EventKind>() == 1);
|
||||||
|
|
||||||
struct Open {
|
struct Open {
|
||||||
index: Option<usize>,
|
index: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,8 @@ max_defs = 256
|
||||||
max_tokens = 4096
|
max_tokens = 4096
|
||||||
|
|
||||||
# Maximum amount of events that the parser may emit in a single chunk.
|
# Maximum amount of events that the parser may emit in a single chunk.
|
||||||
max_parser_events = 4096
|
# These don't take up that much memory (a byte per event), so having many of these isn't a big deal.
|
||||||
|
max_parser_events = 65536
|
||||||
|
|
||||||
# Maximum amount of AST nodes in a single parse.
|
# Maximum amount of AST nodes in a single parse.
|
||||||
ast_capacity = 4096
|
ast_capacity = 4096
|
||||||
|
|
Loading…
Reference in a new issue