Expand description
Contains the parser and AST format used by the Koto language
Macros§
Structs§
- Ast
- A Koto program represented as an Abstract Syntax Tree
- AstCatch
- A catch block definition
- AstFor
- A for loop definition
- AstIf
- An if expression definition
- AstIndex
- The index type used by nodes in the Ast
- AstNode
- A Node in the Ast, along with its corresponding Span
- AstString
- A string definition
- AstTry
- A try expression definition
- Constant
Index - The type used to refer to constants in the ConstantPool
- Constant
Pool - A constant pool produced by the Parser for a Koto script
- Error
- An error that can be produced by the Parser
- Function
- A function definition
- Import
Item - A node in an import item, see Node::Import
- KString
- The String type used by the Koto runtime
- Match
Arm - An arm in a match expression
- Parser
- Koto’s parser
- Position
- Represents a line/column position in a script
- RawString
Delimiter - The delimiter used by a raw string
- Span
- A span is a range in the source code, represented by a start and end position
- String
Format Options - The formatting options that are available for interpolated strings
- String
Slice - String data with defined bounds
- Switch
Arm - An arm in a switch expression
Enums§
- AstBinary
Op - An operation used in BinaryOp expressions
- AstUnary
Op - An operation used in UnaryOp expressions
- Chain
Node - A node in a chained expression
- Constant
- A constant provided by a ConstantPool
- Meta
KeyId - A meta key
- Node
- A parsed node that can be included in the AST.
- String
Alignment - Alignment options for formatted strings
- String
Contents - The contents of an AstString
- String
Node - A node in a string definition
- String
Quote - The type of quotation mark used in string delimiters
- String
Type - The string types that the lexer can produce
Functions§
- format_
source_ excerpt - Renders the excerpt of the source corresponding to the given span