Skip to content

Syntax Features Overview

Fabian Lauer edited this page Apr 17, 2017 · 18 revisions

The following table lists available syntax features and the current status of their implementation in the parser.

πŸ‘ŒΒ on master, stable

βš’Β on master, potentially buggy

βŒ› not implemented or not on master branch

Feature Syntax Example Status
Function Declarations func name() { ... } πŸ‘Œ
(Anonymous) Functions as Expessions func () { ... } βš’
Variable Declarations let, const πŸ‘Œ
Class Declarations class πŸ‘Œ
Class Instance Variable Declarations πŸ‘Œ
Class Instance Method Declarations πŸ‘Œ
Init Methods βŒ›
Static Class Variable Declarations static let, static const βš’
Static Class Method Declarations static func βŒ›
Class Access Modifiers private, protected βŒ›
Operator Overload Declarations βŒ›
CONTROL FLOW
Conditionals if, else if, else βš’
For Loops for βŒ›
Switch Statements switch ... case βŒ›
EXPRESSIONS
Binary Operations a + b, 2 * 3, a = b βš’
Unary Operations a++ βš’
Function Calls fn(), fn(a, b, c), ... βš’
Property Access a.b.c βš’
Expression Lists a, b, 1, 2, 3, ... βš’
LITERALS
String Literals "", "text", ... βš’
Numeric Literals 1, 2, ... βš’
Array Literals [1, 2, 3], [ ], ... βŒ›
PACKAGES
Basic Import Statements import "./file" βš’
Basic Export Statements export varName βš’
TYPES
Array Type Expressions Int[], String[], … βŒ›
Type Aliases βŒ›
POLYMORPHISM βŒ›
Clone this wiki locally