Skip to content
Raven
Programming language for .NET
Getting started
Language reference
API Reference
API Reference overview
Core extensions
Macros
Compiler APIs
Playground
GitHub
▾
Light
Dark
Auto
Search documentation and APIs
Browse documentation
Language reference
×
Find a reference topic
Values and types
Variables and constants: let, var, const
Types, generics, and conversions
Nullable types and suppression: T? and !
Literals, tuples, and basic expressions
Collections and spread
Expressions and type inference
Operators, precedence, and ranges
Functions and calls
Functions: func
Lambdas and function values
Calls and arguments
Parameters, overloads, and custom operators
Delegates
Pipes
Data models and members
Classes, structs, and members
Declarations, constructors, and access
Records
Unions
Enums
Interfaces
Properties, indexers, and events
Inheritance, sealed hierarchies, and partial types
Extension members
Object creation and copying
Patterns and matching
Pattern matching overview
Match expressions and statements
Binding, type, and comparison patterns
Sequence and property patterns
Deconstruction and union-case patterns
Dictionary patterns
Exhaustiveness
Control flow, async, and errors
Control flow overview
Conditionals and loops: if, for, while
Assignments and expression statements
Return and yield
Break, continue, and labels
Async and await
Exceptions: try, catch, finally
Option, Result, and propagation: ?
Files and syntax
Source text, keywords, and comments
Values, expressions, and statements
Namespaces and imports
Top-level code and Main
Grammar
Macros
Macros and compile-time syntax
Memory and .NET interop
Systems programming overview
Spans and stack allocation
Ref structs and ref safety
Unsafe code and native interop
.NET representation and compatibility
Design notes
Grammar
The following is the non-normative EBNF grammar for Raven.
Source file
[!code-ebnf
]