Skip to main content

Crate apif_parser

Crate apif_parser 

Source

Re-exports§

pub use builder::GctfDocumentBuilder;
pub use content_parser::build_section;
pub use content_parser::parse_inline_options;
pub use content_parser::parse_section_content;
pub use core::ParseDiagnostics;
pub use core::parse_gctf;
pub use core::parse_gctf_from_str;
pub use core::parse_gctf_with_diagnostics;
pub use core::serialize_gctf;
pub use document_splitter::split_sections_by_boundary;
pub use error_recovery::ErrorRecoveryResult;
pub use error_recovery::parse_content_with_recovery;
pub use error_recovery::parse_with_recovery;
pub use ternary::process_extract_value;
pub use ternary::ternary_to_jq;
pub use ternary_ast::ExtractValue;
pub use ternary_ast::ExtractVar;
pub use validator::BENCH_ASSERT_MODE_VALUES;
pub use validator::BENCH_CACHE_VALUES;
pub use validator::BENCH_DURATION_KEYS;
pub use validator::BENCH_DURATION_STOP_VALUES;
pub use validator::BENCH_LOAD_SCHEDULE_VALUES;
pub use validator::BENCH_MODE_VALUES;
pub use validator::BENCH_NUMERIC_KEYS;
pub use validator::ErrorSeverity;
pub use validator::ValidationError;
pub use validator::allowed_values_message;
pub use validator::canonical_bench_key;
pub use validator::is_allowed_value;
pub use validator::supported_bench_keys;
pub use validator::validate_document;
pub use validator::validate_document_diagnostics;

Modules§

assertion_ast
AST nodes for assertion expressions.
assertions
ast
builder
content_parser
Section content parser for GCTF files.
core
document_splitter
error_recovery
gctf_tokenizer
Universal GCTF file tokenizer.
json_mod
json_stream_parser
Streaming JSON parser for RESPONSE sections.
ternary
ternary_ast
tokenizer
Public tokenizer for GCTF assertion expressions.
validator

Structs§

FileMeta
File-level metadata (META section)
GctfAttribute
GCTF attribute (#[name(value)] syntax)
GctfDocument
Complete .gctf document
InlineOptions
Inline options for sections
Section
A section in the .gctf file
SectionHeader
GCTF file header with inline options Format: — SECTION_NAME key=value … —
Span
Byte range in source text.
Token
A token with its source position.

Enums§

AssertionExpr
A complete assertion expression (top-level).
BinaryOp
Expr
Atomic expressions (leaf nodes).
Literal
SectionContent
Section content
SectionType
Section types in .gctf files
TokenKind
Token kinds produced by the assertion tokenizer.

Functions§

assertion_to_string
Convert AssertionExpr back to string (ternary for if-then-else).
parse_assertion
Parse a raw assertion string into an AST. Falls back to Raw if parsing fails.
remove_redundant_parens
Remove redundant parentheses.
tokenize_assertion
Tokenize an assertion expression string into a list of tokens with exact byte positions.
tokenize_gctf
tokenize_inline_options
tokenize_kv_line