Expand description
This module contains the parser for the Cedar language.
Modules§
- cst
- Concrete Syntax Tree def used as parser first pass
- err
- error handling utilities
- text_
to_ cst - Step one: Convert text to CST This module contains step one of the parser for the Cedar language. It converts text to a CST
Structs§
- ASTNode
- Metadata for our syntax trees
- Source
Info - Describes where in policy source code a node in the CST or expression AST occurs.
Functions§
- parse_
euid - parse an EntityUID
- parse_
expr - parse an Expr
- parse_
ident - parse an identifier
- parse_
internal_ string - parse a string into an internal Cedar string
- parse_
literal - parse a string into an ast::Literal (does not support expressions)
- parse_
name - parse a Name
- parse_
namespace - Parse a namespace
- parse_
policy - simple main function for parsing a policy.
If
idis Some, then the resulting policy will have thatid. If theidis None, the parser will use “policy0”. - parse_
policy_ template - Simple main function for parsing a policy template.
If
idis Some, then the resulting template will have thatid. If theidis None, the parser will use “policy0”. - parse_
policy_ template_ to_ est_ and_ ast - Like
parse_policy_template(), but also returns the (lossless) EST – that is, the EST of the original template without any of the lossy transforms involved in converting to AST. - parse_
policy_ to_ est_ and_ ast - Like
parse_policy(), but also returns the (lossless) EST – that is, the EST of the original policy without any of the lossy transforms involved in converting to AST. - parse_
policyset - simple main function for parsing policies generates numbered ids
- parse_
policyset_ to_ ests_ and_ pset - Like
parse_policyset(), but also returns the (lossless) ESTs – that is, the ESTs of the original policies without any of the lossy transforms involved in converting to AST. - parse_
request - parse into a
Request - parse_
restrictedexpr - parse a RestrictedExpr