pub enum AstNode {
Show 98 variants
Root {
children: Vec<AstNode>,
},
Fragment {
children: Vec<AstNode>,
},
Head {
children: Vec<AstNode>,
},
Body {
children: Vec<AstNode>,
},
Block {
children: Vec<AstNode>,
src_range: SourceRange,
},
Statement {
children: Vec<AstNode>,
src_range: SourceRange,
},
Expression {
children: Vec<AstNode>,
},
MathExpression {
children: Vec<AstNode>,
},
SelectExpression {
children: Vec<AstNode>,
},
Data {
children: Vec<AstNode>,
},
Whenever {
children: Vec<AstNode>,
},
Wait {
children: Vec<AstNode>,
},
Until {
children: Vec<AstNode>,
},
SetData {
children: Vec<AstNode>,
},
SplitData {
children: Vec<AstNode>,
},
FlattenData {
children: Vec<AstNode>,
},
Binding {
children: Vec<AstNode>,
},
FunctionBinding {
children: Vec<AstNode>,
},
UserFunction {
children: Vec<AstNode>,
},
FunctionBody {
children: Vec<AstNode>,
},
FunctionArgs {
children: Vec<AstNode>,
},
FunctionInput {
children: Vec<AstNode>,
},
FunctionOutput {
children: Vec<AstNode>,
},
DotIndex {
children: Vec<AstNode>,
},
Swizzle {
children: Vec<AstNode>,
},
SubscriptIndex {
children: Vec<AstNode>,
},
Range,
VariableDefine {
children: Vec<AstNode>,
},
TableDefine {
children: Vec<AstNode>,
},
FollowedBy {
children: Vec<AstNode>,
},
AsyncAssign {
children: Vec<AstNode>,
},
TableSelect {
children: Vec<AstNode>,
},
EmptyTable {
children: Vec<AstNode>,
},
InlineTable {
children: Vec<AstNode>,
},
TableHeader {
children: Vec<AstNode>,
},
Attribute {
children: Vec<AstNode>,
},
TableRow {
children: Vec<AstNode>,
},
Comment {
children: Vec<AstNode>,
},
KindAnnotation {
children: Vec<AstNode>,
},
AddRow {
children: Vec<AstNode>,
},
Transformation {
children: Vec<AstNode>,
},
Quantity {
children: Vec<AstNode>,
},
Token {
token: TokenKind,
chars: Vec<char>,
src_range: SourceRange,
},
Add,
Subtract,
Multiply,
MatrixMultiply,
Divide,
Exponent,
LessThan,
GreaterThan,
GreaterThanEqual,
LessThanEqual,
Equal,
NotEqual,
And,
Or,
Xor,
AddUpdate,
SubtractUpdate,
MultiplyUpdate,
DivideUpdate,
ExponentUpdate,
SelectAll,
Empty,
True,
False,
ReshapeColumn,
RationalNumber {
children: Vec<AstNode>,
},
Paragraph {
children: Vec<AstNode>,
},
UnorderedList {
children: Vec<AstNode>,
},
ListItem {
children: Vec<AstNode>,
},
InlineCode {
children: Vec<AstNode>,
},
CodeBlock {
children: Vec<AstNode>,
},
InlineMechCode {
children: Vec<AstNode>,
},
MechCodeBlock {
children: Vec<AstNode>,
},
Null,
Transpose,
Program {
title: Option<Vec<char>>,
children: Vec<AstNode>,
},
Section {
title: Option<Vec<char>>,
level: usize,
children: Vec<AstNode>,
},
WheneverIndex {
children: Vec<AstNode>,
},
SelectData {
name: Vec<char>,
id: TableId,
children: Vec<AstNode>,
src_range: SourceRange,
},
UpdateData {
name: Vec<char>,
children: Vec<AstNode>,
src_range: SourceRange,
},
TableColumn {
children: Vec<AstNode>,
},
Function {
name: Vec<char>,
children: Vec<AstNode>,
src_range: SourceRange,
},
Define {
name: Vec<char>,
id: u64,
src_range: SourceRange,
},
AnonymousTableDefine {
children: Vec<AstNode>,
},
AnonymousMatrixDefine {
children: Vec<AstNode>,
},
Identifier {
name: Vec<char>,
id: u64,
src_range: SourceRange,
},
Table {
name: Vec<char>,
id: u64,
src_range: SourceRange,
},
String {
text: Vec<char>,
src_range: SourceRange,
},
NumberLiteral {
kind: u64,
bytes: Vec<char>,
src_range: SourceRange,
},
SectionTitle {
text: Vec<char>,
src_range: SourceRange,
},
Title {
text: Vec<char>,
level: usize,
src_range: SourceRange,
},
ParagraphText {
text: Vec<char>,
src_range: SourceRange,
},
TransposeSelect {
children: Vec<AstNode>,
},
Incomplete {
children: Vec<AstNode>,
src_range: SourceRange,
},
Error,
}Variants§
Root
Fragment
Head
Body
Block
Statement
Expression
MathExpression
SelectExpression
Data
Whenever
Wait
Until
SetData
SplitData
FlattenData
Binding
FunctionBinding
UserFunction
FunctionBody
FunctionArgs
FunctionInput
FunctionOutput
DotIndex
Swizzle
SubscriptIndex
Range
VariableDefine
TableDefine
FollowedBy
AsyncAssign
TableSelect
EmptyTable
InlineTable
TableHeader
Attribute
TableRow
Comment
KindAnnotation
AddRow
Transformation
Quantity
Token
Add
Subtract
Multiply
MatrixMultiply
Divide
Exponent
LessThan
GreaterThan
GreaterThanEqual
LessThanEqual
Equal
NotEqual
And
Or
Xor
AddUpdate
SubtractUpdate
MultiplyUpdate
DivideUpdate
ExponentUpdate
SelectAll
Empty
True
False
ReshapeColumn
RationalNumber
Paragraph
UnorderedList
ListItem
InlineCode
CodeBlock
InlineMechCode
MechCodeBlock
Null
Transpose
Program
Section
WheneverIndex
SelectData
UpdateData
TableColumn
Function
Define
AnonymousTableDefine
AnonymousMatrixDefine
Identifier
Table
String
NumberLiteral
SectionTitle
Title
ParagraphText
TransposeSelect
Incomplete
Error
Trait Implementations§
source§impl<'de> Deserialize<'de> for AstNode
impl<'de> Deserialize<'de> for AstNode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for AstNode
impl PartialEq for AstNode
impl Eq for AstNode
impl StructuralPartialEq for AstNode
Auto Trait Implementations§
impl Freeze for AstNode
impl RefUnwindSafe for AstNode
impl Send for AstNode
impl Sync for AstNode
impl Unpin for AstNode
impl UnwindSafe for AstNode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.