moonrockz/rego/ast does not have a README file
pub(all) suberror AnnotationError {
InvalidYaml(span~ : SourceSpan, message~ : String)
NotAMapping(span~ : SourceSpan)
InvalidScope(span~ : SourceSpan, value~ : String)
InvalidFieldShape(span~ : SourceSpan, field~ : String, message~ : String)
} derive(Eq, Debug)pub(all) suberror LowerError {
SyntaxErrors(ReadOnlyArray[SyntaxDiagnostic])
AnnotationFailure(AnnotationError)
InvalidTree(span~ : SourceSpan, message~ : String)
} derive(Eq, Debug)impl Show for LowerErrorfn AnnotationScope::parse(text : String, span : SourceSpan) -> AnnotationScope raise AnnotationErrorfn ElseBranch::ElseBranch(assigned~ : AssignedValue?, body~ : RuleBody?, span~ : SourceSpan) -> ElseBranchfn Expr::Expr(kind~ : ExprKind, with_modifiers~ : ArrayView[WithModifier], span~ : SourceSpan) -> Exprpub(all) enum MetadataValue {
Null
Bool(Bool)
Int(Int64)
Float(Double)
String(String)
Seq(ReadOnlyArray[MetadataValue])
Mapping(ReadOnlyArray[(String, MetadataValue)])
} derive(Eq, Debug)fn Module::Module(package_path~ : PackagePath, package_annotations~ : ArrayView[Annotation], imports~ : ArrayView[Import], rules~ : ArrayView[Rule], span~ : SourceSpan) -> Moduleimpl Show for NumberLiteralfn PackagePath::PackagePath(segments~ : ArrayView[RefSegment], span~ : SourceSpan) -> PackagePath raise AstErrorfn Rule::Rule(head~ : RuleHead, body~ : RuleBody?, else_branches~ : ArrayView[ElseBranch], annotations~ : ArrayView[Annotation], span~ : SourceSpan) -> Rulepub(all) enum RuleHead {
Complete(ref_head~ : Ref, assigned~ : AssignedValue?)
PartialSet(ref_head~ : Ref, key~ : Term)
PartialObject(ref_head~ : Ref, key~ : Term, assigned~ : AssignedValue)
Function(ref_head~ : Ref, args~ : ReadOnlyArray[Term], assigned~ : AssignedValue?)
Default(ref_head~ : Ref, args~ : ReadOnlyArray[Term], assigned~ : AssignedValue)
} derive(Eq, Debug)pub(all) enum TermKind {
Null
Bool(Bool)
Number(NumberLiteral)
String(String)
TemplateString(raw~ : Bool, parts~ : ReadOnlyArray[TemplatePart])
Var(Ident)
Ref(Ref)
Call(callee~ : Term, args~ : ReadOnlyArray[Term])
UnaryNeg(Term)
Binary(BinaryOp, Term, Term)
In(key~ : Term?, value~ : Term, domain~ : Term)
Array(ReadOnlyArray[Term])
Set(ReadOnlyArray[Term])
Object(ReadOnlyArray[(Term, Term)])
ArrayComprehension(term~ : Term, body~ : RuleBody)
SetComprehension(term~ : Term, body~ : RuleBody)
ObjectComprehension(key~ : Term, value~ : Term, body~ : RuleBody)
} derive(Eq, Debug)fn parse_metadata_yaml(yaml_text : String, default_scope~ : AnnotationScope, span~ : SourceSpan) -> Annotation raise AnnotationErrorInstall
Download zipPure MoonBit Open Policy Agent (OPA) Rego v1 syntax, AST and policy engine