1#![cfg_attr(
5 not(test),
6 deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)
7)]
8
9pub mod ast;
10pub mod error;
11pub mod parser;
12
13pub use ast::{
14 ActionDef, ActionDefBody, ActionDefBodyElement, ActionUsage, ActionUsageBody,
15 ActionUsageBodyElement, AliasBody, AliasDef, AllocationDef, AllocationUsage, AnalysisCaseDef,
16 AnalysisCaseUsage, Annotation, AstNode, AttributeBody, AttributeDef, AttributeUsage, Bind, CaseDef,
17 CaseUsage, CommentAnnotation, Connect, ConnectBody, ConnectStmt, DocComment, EndDecl,
18 Expression, FilterMember, FilterPackageMember, FirstMergeBody, FirstStmt, Flow, FlowDef,
19 FlowUsage, Identification, Import, InOut, InOutDecl, InterfaceDef, InterfaceDefBody,
20 InterfaceDefBodyElement, InterfaceUsage, InterfaceUsageBodyElement, MergeStmt, NamespaceDecl,
21 Node, OccurrenceBodyElement, OccurrenceUsage, OccurrenceUsageBody, Package, PackageBody,
22 PackageBodyElement, ParseErrorNode, PartDef, PartDefBody, PartDefBodyElement, PartUsage,
23 PartUsageBody, PartUsageBodyElement, Perform,
24 PerformBody, PerformBodyElement, PerformInOutBinding, PortBody, PortDef, PortDefBody,
25 PortDefBodyElement, PortUsage, RefBody, RefDecl, RequireConstraint, RequireConstraintBody,
26 RequirementDef, RequirementDefBody, RequirementDefBodyElement, RequirementUsage, RootElement,
27 RootNamespace, Span, TextualRepresentation, VerificationCaseDef, VerificationCaseUsage,
28 Visibility,
29};
30pub use error::{DiagnosticSeverity, ParseError};
31pub use parser::{parse_root, parse_with_diagnostics, ParseResult};
32
33#[allow(clippy::result_large_err)]
37pub fn parse(input: &str) -> Result<RootNamespace, ParseError> {
38 parse_root(input)
39}
40
41pub fn parse_for_editor(input: &str) -> ParseResult {
46 parse_with_diagnostics(input)
47}