Optimize data structures.

This commit is contained in:
Stephen Chung
2020-11-06 16:27:40 +08:00
parent c6ef2d1e95
commit 07a8a43298
8 changed files with 88 additions and 95 deletions

View File

@@ -85,9 +85,14 @@ impl EvalContext<'_, '_, '_, '_, '_, '_, '_, '_, '_> {
}
}
/// Definition of a custom syntax definition.
pub struct CustomSyntax {
/// A parsing function to return the next keyword in a custom syntax based on the
/// keywords parsed so far.
pub parse: Box<FnCustomSyntaxParse>,
/// Custom syntax implementation function.
pub func: Shared<FnCustomSyntaxEval>,
/// Delta number of variables in the scope.
pub scope_delta: isize,
}