Yume
Namespaces | Classes | Typedefs | Enumerations | Functions
yume::ast Namespace Reference

Namespaces

namespace  parser
 

Classes

class  AnyBase
 Represents "any" kind of ast node of type T. See AnyExpr, AnyStmt and AnyType. More...
 
struct  AnyTypeOrExpr
 
struct  AssignExpr
 An assignment (=). More...
 
class  AST
 All nodes in the AST tree of the program inherit from this class. More...
 
struct  Attachment
 Represents the relationship between multiple AST nodes. More...
 
struct  BinaryLogicExpr
 A logical operator such as || or &&. Since these aren't overloadable, they have their own AST node. More...
 
struct  BoolExpr
 Bool literals (true or false). More...
 
struct  CallExpr
 A function call or operator. More...
 
struct  CharExpr
 Char literals. More...
 
struct  Compound
 A statement consisting of multiple other statements, i.e. the body of a function. More...
 
struct  ConstDecl
 A declaration of a constant (const). More...
 
struct  ConstExpr
 A constant. Currently global. More...
 
struct  CtorDecl
 A declaration of a custom constructor (def :new). More...
 
struct  CtorExpr
 A construction of a struct or cast of a primitive. More...
 
class  Decl
 Base class for a named declaration. More...
 
struct  DtorExpr
 A destruction of an object upon leaving its scope. More...
 
class  Expr
 Expressions have an associated value and type. More...
 
struct  FieldAccessExpr
 Direct access of a field of a struct (::). More...
 
struct  FnDecl
 A declaration of a function (def). More...
 
struct  FunctionType
 A function type i.e. ->(Foo,Bar)Baz. More...
 
struct  GenericParam
 A generic, compile-time argument to a struct or function definition, comparable to C++ template parameters. Like C++ templates, these can be non-type parameters. If it's a generic type parameter, such as the following: More...
 
struct  IfClause
 Clauses of an if statement IfStmt. More...
 
struct  IfStmt
 An if statement (if), with one or more IfClauses, and optionally an else clause. More...
 
struct  ImplicitCastExpr
 Represents an implicit cast to a different type, performed during semantic analysis. More...
 
struct  LambdaExpr
 A local definition of an anonymous function. More...
 
struct  NumberExpr
 Number literals. More...
 
class  OptionalAnyBase
 Represents "any" kind of ast node of type T, or the absence of one. See OptionalExpr and OptionalType. More...
 
struct  Program
 The top level structure of a file of source code. More...
 
struct  ProxyType
 A type which refers to a different type, specifically that of a struct field. More...
 
struct  QualType
 A type with a Qualifier like mut or [] following. More...
 
struct  ReturnStmt
 Return from a function body. More...
 
struct  SelfType
 The self type. More...
 
struct  SimpleType
 Just the name of a type, always capitalized. More...
 
struct  SliceExpr
 A slice literal, i.e. an array. More...
 
class  Stmt
 Statements make up most things in source code. More...
 
struct  StringExpr
 String literals. More...
 
struct  StructDecl
 A declaration of a struct (struct) or an interface (interface). More...
 
struct  TemplatedType
 A type with explicit type parameters i.e. Foo<Bar,Baz>. More...
 
class  TokenIterator
 An iterator-like holding Tokens, used when parsing. More...
 
class  Type
 A type annotation. This (ast::Type) is distinct from the actual type of a value (ty::Type). More...
 
struct  TypeExpr
 Represents a reference to a type. More...
 
struct  TypeName
 A pair of a Type and an identifier, i.e. a parameter name. More...
 
struct  VarDecl
 A declaration of a local variable (let). More...
 
struct  VarExpr
 A variable, i.e. just an identifier. More...
 
struct  WhileStmt
 A while loop (while). More...
 

Typedefs

using AnyStmt = AnyBase< Stmt >
 
using OptionalStmt = OptionalAnyBase< Stmt >
 
using AnyType = AnyBase< Type >
 
using OptionalType = OptionalAnyBase< Type >
 
using AnyExpr = AnyBase< Expr >
 
using OptionalExpr = OptionalAnyBase< Expr >
 
using VectorTokenIterator = vector< Token >::iterator
 

Enumerations

enum  Kind {
  K_Unknown , K_IfClause , K_TypeName , K_GenericParam ,
  K_Stmt , K_Compound , K_While , K_If ,
  K_Return , K_Program , K_Decl , K_FnDecl ,
  K_CtorDecl , K_StructDecl , K_VarDecl , K_ConstDecl ,
  K_END_Decl , K_Expr , K_Number , K_Char ,
  K_Bool , K_String , K_Var , K_Const ,
  K_Call , K_BinaryLogic , K_Ctor , K_Dtor ,
  K_Slice , K_Lambda , K_Assign , K_FieldAccess ,
  K_ImplicitCast , K_TypeExpr , K_END_Expr , K_END_Stmt ,
  K_Type , K_SimpleType , K_QualType , K_TemplatedType ,
  K_FunctionType , K_SelfType , K_ProxyType , K_END_Type
}
 

Functions

auto constexpr kind_name (Kind type) -> const char *
 

Typedef Documentation

◆ AnyExpr

using yume::ast::AnyExpr = typedef AnyBase<Expr>
See also
AnyBase

Definition at line 448 of file ast.hpp.

◆ AnyStmt

using yume::ast::AnyStmt = typedef AnyBase<Stmt>
See also
AnyBase

Definition at line 307 of file ast.hpp.

◆ AnyType

using yume::ast::AnyType = typedef AnyBase<Type>
See also
AnyBase

Definition at line 322 of file ast.hpp.

◆ OptionalExpr

See also
OptionalAnyBase

Definition at line 450 of file ast.hpp.

◆ OptionalStmt

See also
OptionalAnyBase

Definition at line 309 of file ast.hpp.

◆ OptionalType

See also
OptionalAnyBase

Definition at line 325 of file ast.hpp.

◆ VectorTokenIterator

using yume::ast::VectorTokenIterator = typedef vector<Token>::iterator

Definition at line 23 of file parser.hpp.

Enumeration Type Documentation

◆ Kind

Enumerator
K_Unknown 

Unknown, default, zero value. Hopefully never encountered!

K_IfClause 

IfClause

K_TypeName 

TypeName

K_GenericParam 

GenericParam

K_Stmt 

Stmt

subclasses of Stmt

K_Compound 

Compound

K_While 

WhileStmt

K_If 

IfStmt

K_Return 

ReturnStmt

K_Program 

Program

K_Decl 

Decl

K_FnDecl 

FnDecl

K_CtorDecl 

CtorDecl

K_StructDecl 

StructDecl

K_VarDecl 

VarDecl

K_ConstDecl 

ConstDecl

K_END_Decl 
K_Expr 

Expr

K_Number 

NumberExpr

K_Char 

CharExpr

K_Bool 

BoolExpr

K_String 

StringExpr

K_Var 

VarExpr

K_Const 

ConstExpr

K_Call 

CallExpr

K_BinaryLogic 

BinaryLogicExpr

K_Ctor 

CtorExpr

K_Dtor 

DtorExpr

K_Slice 

SliceExpr

K_Lambda 

LambdaExpr

K_Assign 

AssignExpr

K_FieldAccess 

FieldAccessExpr

K_ImplicitCast 

ImplicitCastExpr

K_TypeExpr 

TypeExpr

K_END_Expr 
K_END_Stmt 
K_Type 

Type

subclasses of Type

K_SimpleType 

SimpleType

K_QualType 

QualType

K_TemplatedType 

TemplatedType

K_FunctionType 

TemplatedType

K_SelfType 

SelfType

K_ProxyType 

ProxyType

K_END_Type 

Definition at line 35 of file ast.hpp.

Function Documentation

◆ kind_name()

auto constexpr yume::ast::kind_name ( Kind  type) -> const char*
inlineconstexpr