# Introduction

[![NPM version](https://badge.fury.io/js/budgie.svg)](http://badge.fury.io/js/budgie) [![Greenkeeper badge](https://badges.greenkeeper.io/budgielang/budgie.svg)](https://greenkeeper.io/) [![Circle CI](https://circleci.com/gh/budgielang/budgie.svg?style=svg)](https://circleci.com/gh/budgielang/budgie)

A unified syntax that compiles into a number of OOP languages. *Formerly known as General Language Syntax (GLS).*

* 🎭 Try it at [**budgielang.org**](https://budgielang.org) 🎭
* 📚 Read the docs on [**docs.budgielang.org**](https://docs.budgielang.org) 📚

> **Budgie is still under development. Don't expect everything to work!**

## Usage

Budgie can be used as a command-line app or via `import`/`require`.

### CLI

To convert `file.bg` to `file.py`:

```
npm install budgie-cli --global

budgie --language Python file.bg
```

See [budgie-cli](https://github.com/budgielang/budgie-cli).

### Code

`npm install budgie`

```javascript
import { Budgie } from "budgie";

const budgie = new Budgie("C#");

// System.Console.WriteLine("Hello world!");
budgie.convert([`print : ("Hello world!")`]);
```

## Why?

No reason in particular!

Budgie is not intended to be a useful language or targeted to any real purpose. It's a proof-of-concept exploration for the fun of it.

## Status

Budgie is just shy of **0.4**.

| Deliverable                      | Version | Description                                                                                                                                                               |
| -------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| C++ Compiler                     | 0.1     | Command-line Budgie prototype, written in C++.                                                                                                                            |
| TypeScript Compiler draft        | 0.2     | Budgie compiler as a website, written in TypeScript.                                                                                                                      |
| TypeScript Compiler + C# Output  | 0.3     | Budgie compiler re-written in TypeScript. Near-working C#, Java, JavaScript, Python, Ruby, and TypeScript output.                                                         |
| Roundtripping Feature Complete   | 0.4     | All features required for roundtripping implemented. Working C# and TypeScript output. Near-working Java, JavaScript, Python, and Ruby output. Switched to a better name. |
| Full Language Outputs            | 0.5     | Working C#, Java, JavaScript, Ruby, Python, and TypeScript output.                                                                                                        |
| Haxe, Powershell, Misc.          | 0.6     | Onboard or reject those languages and other possibilities.                                                                                                                |
| Language Specification Finalized | 0.7     | Finalized language spec & cleaned internals of code.                                                                                                                      |
| General Release                  | 1.0     | Public announcement, glory to everyone.                                                                                                                                   |

## Development

If you'd like to contribute to Budgie, see [Development.md](https://github.com/budgielang/budgie/blob/master/docs/development.md).

> Requires Node >=12

💖 Many thanks to [@matthojo](https://github.com/matthojo) for allowing use of the `budgie` npm package name!


# Syntax

Each line in Budgie starts with a function name. If there are arguments, they are preceded by a space-padded colon following the function name, all separated by spaces.

```
print : "Budgie!"
```

* Function: `print`
* Argument: `"Budgie!"`

This will compile to:

* In C#: `System.Console.WriteLine("Budgie!");`
* In Python: `print("Budgie!")`

Many commands, including `print`, may take in multiple arguments:

```
print : "Chirp" "chirp!"
```

* Function: `print`
* Arguments: `"Chirp"`, `"chirp!"`

## Parenthesis

You can keep spaces inside your arguments by wrapping characters in parenthesis. This tells the compiler to treat the space as part of the argument instead of a separator.

```
print : ("Hello world!")
```

* Function: `print`
* Argument: `"Hello world!"`

## Recursion

To pipe the output of one command into another, wrap the inner command with`{}`brackets.

```
print : { operation : 1 plus 2 }
```

* Function: `print`
* Argument:
  * Function: `operation`
  * Arguments: `1`, `plus`, `2`


# Comments

Most languages have two concepts of comments: single-line and multi-line. Budgie supports both.

## Single Line Comments

Use the `comment line` command. It takes in any number of parameters and directly outputs them.

```
comment line : Hello world!
```

* In C#: `// Hello world!`
* In Python: `# Hello world!`

## Multi Line Comments

Also known as "block" comments, these are preceded by `comment block start` and ended with `comment block end`. Each line of actual block content comes from `comment block`, which, like `comment line`, directly prints all its parameters.

```
comment block start
comment block : Hello world!
comment block end
```

In C#:

```csharp
/*
 * Hello world!
 */
```

In Python:

```python
"""
Hello world!
"""
```


# Strings

Strings in Budgie are denoted with *double* apostrophes (`"`). Do not use single apostrophes or back-ticks.

> Some languages, such as C#, use single apostrophes to denote single characters and not strings.

## Concatenation

The `concatenate` command appends two or more strings together.

```
concatenate : "abc" def "ghi"
```

* In C#: `"abc" + def + "ghi"`
* In Python: `"abc" + def + "ghi"`

## Characters

Some languages, such as JavaScript and Ruby, do not recognize a difference between a one-length string, or `char`, and an arbitrary-length `string`. Less high-level languages, such as C# and Java, consider them to be a `char`.

```
variable : a char 'a'
```

* In C#: `char a = 'a';`
* In Python: `a = "a"`

### Indexing

Individual characters in a string may be indexed with the `string index` command. It takes in a string and a character index int, and returns a `char`.

```
variable : text string "abc"
variable : first char { string index : text 0 }
```

In C#:

```csharp
string text = "abc";
char first = text[0];
```

In Python:

```python
text = "abc"
first = text[0]
```

## Formatting

The `string format` command allows inserting primitives into a format string. It takes in a single format string, then any number of input name & type pairs. Format strings are string literals with any number of bracket-surrounded numbers inside, with the format `{#}`.

```
variable : foo string "foo"
variable : bar int 7

string format : ("Foo: {0}") foo string
string format : ("Foo: {0}; Bar: {1}") foo string bar int
```

In C#:

```csharp
string foo = "foo";
int bar = 7;

string.Format("Foo: {0}", "Foo: {0}");
string.Format("Foo: {0}; Bar: {1}", foo, bar);
```

In Python:

```python
foo = "foo"
bar = 7

"Foo: {0}".format(foo)
"Foo: {0}; Bar: {1}".format(foo, bar)
```

Some languages, such as C# and Python above, use string formatting with numeric insertion points into the template string. Some, such as JavaScript, boil down to concatenating them together. As a result, it is not allowed to use the same `{#}` number multiple times in the format string.

## Searching

The `string index of` command can be used to determine whether a substring exists within a string. It returns the index of the substring if found, or the equivalent of the `string index not found` command if not found. It may also take in an optional third parameter as an integer position within the string to start searching at, if not `0`.

```
variable : haystack string ("Hello, Budgie!")
variable : needle string "Budgie"
variable : firstIndexOf int { string index of : haystack needle }
variable : secondIndexOf int { string index of : haystack needle { operation : firstIndexOf plus { string length : needle } } }

print : { string format : ("Found a first result at: {0}.") firstIndexOf int }

if start : { operation : secondIndexOf (not equal to) { string index not found } }
    print : { string format : ("Found a second result at: {0}.") secondIndexOf int }
if end
```

In C#:

```csharp
using System;

string haystack = "Hello, Budgie!";
string needle = "Budgie";
int firstIndexOf = haystack.IndexOf(needle);
int secondIndexOf = haystack.IndexOf(needle, firstIndexOf + needle.Length);

Console.WriteLine(string.Format("Found a first result at: {0}.", firstIndexOf));

if (secondIndexOf != -1)
{
    Console.WriteLine(string.Format("Found a second result at: {0}.", secondIndexOf));
}
```

In Python:

```python
haystack = "Hello, Budgie!"
needle = "Budgie"
firstIndexOf = haystack.find(needle)
secondIndexOf = haystack.find(needle, firstIndexOf + len(needle))

print("Found a first result at: {0}.".format(firstIndexOf))

if secondIndexOf != -1:
    print("Found a second result at: {0}.".format(secondIndexOf))
```


# Variables

Budgie allows for creating variables with the `variable` command. It requires the variable name, the type of the variable, and an optional default value.

> Untyped languages such as JavaScript will skip printing the variable type.
>
> Pythonic languages such as Python and Ruby will skip declaring variables without a default value.

```
comment line : Simple declarations
variable : foo string
variable : bar number 7

comment line : Assignments
variable : qux string foo
variable : baz number bar

comment line : Interesting values
variable : quux number infinity
variable : corge boolean true
```

In C#:

```csharp
// Simple declarations
string foo;
double bar = 7;

// Assignments
string qux = foo;
double baz = bar;

// Interesting values
double quux = double.PositiveInfinity;
bool corge = true;
```

In Python:

```python
# Simple declarations
bar = 7

# Assignments
qux = foo
baz = bar

# Interesting values
quux = inf
corge = True
```

## Types

As you saw from the interesting values above, some types such as infinity or true/false have aliases per language.

Built-in types will always be lower-case in Budgie. Uppercase types will always refer to user-defined classes.


# Math

Most simple math operations are doable with the `operation` command. It takes in an odd number of parameters, alternating between values (which can be either direct numbers or variable names) and operators. Operators are given as plain names with spaces between words. The supported operators are:

| Budgie Syntax            | Common Equivalent |
| ------------------------ | ----------------- |
| and                      | `&&`              |
| decrease by              | `-=`              |
| divide                   | `/`               |
| divide by                | `/=`              |
| equal to                 | `=`               |
| equals                   | `==`              |
| greater than             | `>`               |
| greater than or equal to | `>=`              |
| increase by              | `+=`              |
| less than                | `<`               |
| less than or equal to    | `<=`              |
| minus                    | `-`               |
| mod                      | `%`               |
| multiply by              | `*=`              |
| not                      | `!`               |
| not equal to             | `!=`              |
| or                       | `\|\|`            |
| plus                     | `+`               |
| times                    | `*`               |

> Recall that parenthesis are required for arguments with spaces: including operator aliases.

The `parenthesis` command is also commonly used with math. It takes a single argument and wraps it in `()` parentheses.

```
operation : foo times 2
operation : foo (decrease by) bar times { parenthesis : { operation : bar minus 3 } }
variable : bar double { operation : foo (divide by) 3 plus 4 times foo }
```

In C#:

```csharp
foo *= 2;
foo -= bar * (bar - 3);
double bar = foo /= 3 + 4 * foo;
```

In Python:

```python
foo *= 2
foo -= bar * (bar - 3)
bar = foo /= 3 + 4 * foo
```

## Number Types

Some languages recognize a difference between integers, doubles, floats, and other number types. Some do not. For feature parity between other languages, Budgie recognizes only `int` and `double` as valid number types. `float`, `long`, `ushort`, and so on are not supported.

### Number Conversions

When you have a `double` and need an `int`, use the `math as int` command to truncate and convert to an `int`. It behaves similarly to `math floor` but returns an `int` instead of a `double`.

```
variable : rounded int { math as int : 3.5 }
```

* In C#: `int rounded = (int)3.5;`
* In Python: `rounded = math.floor(3.5)`

## Native Commands

All supported languages provide some amount of built-in math operations beyond the simple arithmetic operators. These are typically encapsulated in some kind of global `Math` object and/or system namespace that contains simple functions and constants.

Budgie abstracts away the differences in these "native" commands. For example:

```
math max : foo bar
```

* In C#: `Math.Max(foo, bar)`
* In Python: `max(foo, bar)`

All possible native math commands are given below.

| Budgie Syntax | Common Equivalent |
| ------------- | ----------------- |
| math absolute | `math.abs()`      |
| math ceiling  | `math.ceil()`     |
| math floor    | `math.floor()`    |
| math max      | `math.max()`      |
| math min      | `math.min()`      |
| math power    | `math.pow()`      |


# String Conversions

You can attempt to convert from raw strings to doubles or ints. Different languages expose vastly different behaviors around cases where the numbers cannot be converted, so blocks of code that rely on converted numbers are structured similarly to `if start` statements.

Use `if string to double start` and `if string to int start` to convert string(s) to double(s) or int(s), respectively. Each takes in any number of repeating parameters: a string to convert and the numeric type to try to store it in. Code before the next respective `if string to double end` or `if string to int end` will run only if the conversion was successful.

```
if string to double start : "3.5" asDouble
    comment line : ...
if string to double end

variable : secondIntRaw string "14"
if string to int start : "7" firstInt secondIntRaw secondInt
    comment line : ...
if string to int end
```

C#:

```csharp
if (double.TryParse("3.5", out var asDouble))
{
    // ...
}

string secondIntRaw = "14";
if (int.TryParse("7", out var firstInt) && int.TryParse(secondIntRaw, out var secondInt))
{
    // ...
}
```

Python:

```python
asDouble = None

try:
    asDouble = float("3.5")
except:
    pass

if asDouble is not None:
    # ...

secondIntRaw = "14"
firstInt = None
secondInt = None

try:
    firstInt = int("7")
    secondInt = int(secondIntRaw)
except:
    pass

if firstInt is not None and secondInt is not None:
    # ...
```


# Arrays and Lists

Although some output languages don't consider there to be a difference between arrays and lists, Budgie defines them as:

* **Array**: A fixed length data structure of a single templated type
* **List**: A variable length data structure of a single templated type

Budgie considers the two to be two different data structures and has mostly separate commands for each.

## Arrays

Because arrays are fixed-length, there are very few operations available on them.

Create new arrays with `array new`, which takes in the type of array and any number of initial items in the array. For variables, declare the type of the array with `array type`, which takes in the type of the array.

Retrieve a single member of an array with `array get`, which takes in a name of a container and an integer index.

```
array get : container 1
```

* In C#: `container[1]`
* In Python: `container[1]`

Set a single member of an array with `array set`, which takes in a name of an array, an integer index, and a new value.

```
array set : container 1 "apple"
```

* In C#: `container[1] = "apple";`
* In Python: `container[1] = "apple"`

Get the length of an array with `array length`, which takes in a name of an array.

```
variable : fruits { array type : string } { array new : string "apple" "banana" "cherry" }

print : { string format : ("There are {0} fruits.") { array length : fruits } int }
print : { string format : ("The first fruit is {0}.") { array get : fruits 0 } string }
```

In C#:

```csharp
string[] fruits = new string[] { "apple", "banana", "cherry" };

Console.WriteLine(string.Format("There are {0} fruits.", fruits.Length));
Console.WriteLine(string.Format("The first fruit is {0}.", fruits[0]));
```

In Python:

```python
fruits = ["apple", "banana", "cherry"]

print("There are {0} fruits.".format(len(fruits)))
print("The first fruit is {0}.".format(fruits[0]))
```

### Generic Arrays

Creating arrays of generic types with the `array new generic` and `array new generic sized` commands. They're used the same as their non-generic counterparts.

```
variable : items { array type : T } { array new generic : T one two three }
variable : storage { array type : T } { array new sized generic : T 10 }
```

In C#:

```csharp
T[] items = new T[] { one, two, three };
T[] storage = new T[10];
```

In Python:

```python
items = [one, two three]
storage = [None] * 10
```

## Lists

Budgie lists are much more flexible than arrays. They can be dynamically resized, added onto one another, and sorted.

Retrieve a single member of a list with `list get`, which takes in a name of a container and an integer index.

```
list get : container 1
```

* In C#: `container[1]`
* In Python: `container[1]`

Set a single member of a list with `list set`, which takes in a name of a list, an integer index, and a new value.

```
list set : container 1 "apple"
```

* In C#: `container[1] = "apple";`
* In Python: `container[1] = "apple"`

### Creating Lists

Similar to arrays, create a new list with `list new`, declare a list type with `list type`, and get a list's length with `list length`. Add a single item to a list with `list pop`, which takes in a name of a list and a new item, or add a full list to another list with `list add list`, which takes in the name of an existing list and a second list to add to the existing list.

```
variable : fruits { list type : string } { list new : string "apple" "banana" "cherry" }

list push : fruits "dragonberry"
list add list : fruits { list new : string "elderberry" "fig" }

print : { string format : ("There are {0} fruits.") { list length : fruits } int }
print : { string format : ("The first fruit is {0}.") { list get : fruits 0 } string }
print : { string format : ("The last fruit is {0}.") { list get : fruits { operation : { list length : fruits } minus 1 } } string }
```

In C#:

```csharp
using System;

List<string> fruits = new List<string> { "apple", "banana", "cherry" };

fruits.Add("dragonberry");
fruits.AddRange(new List<string> { "elderberry", "fig" });

Console.WriteLine(string.Format("There are {0} fruits.", fruits.Count));
Console.WriteLine(string.Format("The first fruit is {0}.", fruits[0]));
Console.WriteLine(string.Format("The last fruit is {0}.", fruits[fruits.Count - 1]));
```

In Python:

```python
fruits = ["apple", "banana", "cherry"]

fruits.append("dragonberry")
fruits.extend(["elderberry", "fig"])

print("There are {0} fruits.".format(fruits.len()))
print("The first fruit is {0}.".format(fruits[0]))
print("The last fruit is {0}.".format(fruits[len(fruits) - 1]))
```


# Sorting

Budgie supports four forms of sorting lists, all in-place.

## As Numbers

For lists of type `int` or `double`, or a generic guaranteed to only ever either of those numeric types, you can sort the list with `list sort numbers`. It takes in the name of the list and sorts it with numeric comparisons.

JavaScript runtimes default to sorting values as strings, so this will pass in a lambda to compare them as numbers as needed.

```
variable : numbers { list type : int } { list new : int 20 5 15 10 }

comment line : 5, 10, 15, 20
list sort numbers : numbers
```

In C#:

```csharp
List<int> numbers = new List<int> { 5, 15, 10 };

// 5, 10, 15, 20
numbers.Sort();
```

In Python:

```python
numbers = [20, 5, 15, 10]

# 5, 10, 15, 20
numbers.sort()
```

## As Strings

For lists of type `string`, you can sort the list with `list sort strings`. It takes in the name of the list and sorts it with string comparisons.

```
variable : fruits { list type : string } { list new : string "date", "apple" "cherry", "banana" }

comment line : "apple", "banana", "cherry", "date"
```

In C#:

```csharp
List<string> fruits = new List<string> { "date", "apple", "cherry", "banana" };

// "apple", "banana", "cherry", "date"
fruits.Sort();
```

In Python:

```python
fruits = "date", "apple", "cherry", "banana"

# "apple", "banana", "cherry", "date"
fruits.sort()
```

## By Member Numbers

Lists of complex objects, namely class or interface instances, can be sorted by a single keyed member of those objects. `list sort member numbers` takes in the name of a list, the privacy type of members, a name for instances inside a comparison lambda, and the PascalCase key to look up under the instances.

Members will be compared using the built-in `<` operator.

```
class start : Size
    member variable declare : public Count int

    constructor start : public Size count int
        operation : { member variable : public { this } Count } equals count
    constructor end
class end

comment line : ...

variable : sizes { list type : Size } { list new : Size { new : Size 3 } { new : Size 1 } { new : Size 2 } }

comment line : 1, 2, 3
list sort member numbers : sizes public size Count
```

In C#:

```csharp
class Size
{
    public int Count;

    public Size(int count)
    {
        this.Count = count;
    }
}

// ...

List<Sizes> sizes = new List<Size> { new Size(3), new Size(1), new Size(2) };

// 1, 2, 3
sizes.Sort((sizeA, sizeB) => sizeA.Name < sizeB.Name ? 1 : -1);
```

In Python:

```python
class Size:
    def __init__(self, count):
        self.count = count

# ...

sizes = [Size(3), Size(1), Size(2)]

# 1, 2, 3
sizes.sort(key = lambda size: size.count)
```

## By Member Strings

`list sort member strings` takes in the name of a list, the privacy type of members, a name for instances inside a comparison lambda, and the PascalCase key to look up under the instances. It's equivalent to `list sort member numbers` but compares members using built-in string comparisons.

```
class start : Fruit
    member variable declare : public Name string

    constructor start : public Fruit name string
        operation : { member variable : public { this } Name } equals name
    constructor end
class end

comment line : ...

variable : fruits { list type : Fruit } { list new : Fruit { new : Person "banana" } { new : Person "cherry" } { new : Person "apple" } }

comment line : "apple", "banana", "cherry"
list sort member strings : fruits public fruit Name
```

In C#:

```csharp
class Fruit
{
    public string Name;

    public Fruit(string name)
    {
        this.Name = name;
    }
}

// ...

List<Fruit> fruits = new List<Fruit> { new Fruit("banana"), new Fruit("cherry"), new Fruit("apple") };

// "apple", "banana", "cherry"
fruits.Sort((fruitA, fruitB) => fruitB.Name.CompareTo(fruitA.Name));
```

In Python:

```python
class Fruit:
    def __init__(self, name):
        self.name = name

# ...

fruits = [Fruit("banana"), Fruit("cherry"), Fruit("apple")]

# "apple", "banana", "cherry"
fruits.sort(key = lambda fruit: fruit.name)
```


# Dictionaries

The concept of a data structure with mapped keys to values changes drastically across output languages. All support some form of creating a dictionary and getting or setting values in it.

Create a new dictionary with `dictionary new`, which takes in the key and value types of the dictionary. Accessing members is done with `dictionary get` and setting is done with with `dictionary set`.

```
variable : counts { dictionary type : string int } { dictionary new : string int }
dictionary set : counts "apple" 3

variable : apple string { dictionary get : counts "apple" }
```

In C#:

```csharp
Dictionary<string, int> counts = new Dictionary<string, int>();
counts["apple"] = 3;

string apple = counts["apple"];
```

In Python:

```python
counts = {}
counts["apple"] = 3

apple = counts["apple"]
```

Alternately, create a multi-line initialization with `dictionary new start`, which is otherwise identical, and `dictionary new end`. Describe each pair of initial values inside with `dictionary pair`, which takes in the key type, value type, and a `,` if it isn't the last pair of initialization.

```
variable start : counts { dictionary type : string int } { dictionary new start : string int }
    dictionary pair : "apple" 3 ,
    dictionary pair : "banana" 2
dictionary new end
```

In C#:

```csharp
Dictionary<string, int> counts = new Dictionary<string, int>
{
    { "apple", 3 },
    { "banana", 2 }
};
```

In Python:

```python
counts = {
    "apple": 3,
    "banana": 2
}
```


# Enums

An "enum" is a container for a specific set of constant names that should be referenced by variables. Languages vary in their understanding of how to represent these fixed values, but all can achieve some equivalent.

Start an enum with `enum start`, which takes in a PascalCase name of an enum. Ed an enum with `enum end`.

Each enum value is declared with `enum member`, which takes in a PascalCase name of a member value, an integer value, and if not the last in the enum, a `,` comma.

```
enum start : Direction
    enum member : Unknown 0 ,
    enum member : Horizontal 1 ,
    enum member : Vertical 2
enum end
```

In C#:

```csharp
enum Direction
{
    Unknown = 0,
    Horizontal = 1,
    Vertical = 2
}
```

In Python:

```python
class Direction(Enum):
    Unknown = 0
    Horizontal = 1
    Vertical = 2
```

Enum types can be treated as their own type in type declarations. Later on, you can reference these enum values using the `enum` command, which takes in a name of an enum and a name of one of its values.

```
variable : direction Direction { enum : Direction Horizontal }
```

* In C#: `Direction direction = Direction.Horizontal;`
* In Python: `direction = Direction.Horizontal`

## Exports

You can export enums from the current file by including the `export` keyword before the enum's name.

```
enum start : export Direction
    enum member : Unknown 0 ,
    enum member : Horizontal 1 ,
    enum member : Vertical 2
enum end
```

In C#:

```csharp
public enum Direction
{
    Unknown = 0,
    Horizontal = 1,
    Vertical = 2
}
```

In Python:

```python
class Direction(Enum):
    Unknown = 0
    Horizontal = 1
    Vertical = 2
```

## Notes

Enums are fairly non-standard across languages. Don't assume member values to be anything more than a visual suggestion:

* Some languages such as C# will sometimes later treat the values as string-likes, such as in string contatenation.
* Some languages such as Java will skip printing them altogether.


# Classes

The concept of creating instances of classes with access to member variables and methods is common across languages.

Create a class with `class start`. It takes in, at the very least, the name of the class (in PascalCase as with functions). You can then also provide `extends` and a name of a class to indicate a single class to inherit from.

End it with `class end`.

```
class start : Word
    comment line : ...
class end

class start : Noun extends Word
    comment line : ...
class end
```

In C#:

```csharp
class Word
{
    // ...
}

class Noun : Word
{
    // ...
}
```

In Python:

```python
class Word:
    # ...

class Noun(Word):
    # ...
```

## Constructors

Constructors, or initialization methods, are called when a new instance of a class is created. It's declared with `constructor start`, which takes the publicity of the constructor, the name of the class, and any number of (name, type) arguments, and `constructor end`.

Inherited classes that define a constructor must provide an additional `base` argument along with any parameters to call to their parent class' constructor.

```
class start : Noun extends Word
    constructor start : public Noun name string base
        print : { concatenate : ("Creating ") name }
    constructor end
class end
```

In C#:

```csharp
class Noun : Word
{
    Noun(string name)
        : base()
    {
        Console.WriteLine("Creating " + name);
    }
}
```

In Python:

```python
class Noun(Word):
    def __init__(self, name):
        super().__init__()
        print("Creating " + name)
```

## This

You can pass a reference to the current class using the `this` command.

```
this
```

* In C#: `this`
* In Python: `self`

## New

Create new instances of classes with the `new` command. It takes in the name of the class and any number of arguments to pass to the parameter.

```
variable : fruit Noun { new : Noun "apple" }
```

* In C#: `Noun fruit = new Noun("apple");`
* In Python: `fruit = Noun("apple")`

## Exports

You can export classes from the current file by including the `export` keyword before the class' name.

```
class start : export Word
    comment line : ...
class end
```

In C#:

```csharp
public class Word
{
    // ...
}
```

In Python:

```python
class Word:
    // ...
```


# Member Variables

Classes may define member variables that each instance of that class contains. Class instances may retrieve those variables.

Declaring a member variable is done with `member variable declare`. It takes in the variable's privacy (as `public`, `protected`, or `private`), name in camelCase, and type.

Member variables can then be accessed with `member variable`, which takes in the privacy of the member variable, the instance to retrieve the member from, and the name of the member variable.

> Privacy is needed for accessing variables because some languages, such as Python, have different naming conventions per member variable privacy.

```
class start : Person
    member variable declare : private name string
    member variable declare : private age double

    constructor start : public Person name string age double
        operation : { member variable : private { this } name } equals name
        operation : { member variable : private { this } age } equals age
    constructor end
class end
```

In C#:

```csharp
class Person
{
    private string name;
    private double age;

    Person(string name, double age)
    {
        this.name = name;
        this.age = age;
    }
}
```

In Python:

```python
class Person:
    def __init__(self, name, age):
        self.__name = name
        self.__age = age
```


# Member Functions

Classes may declare member functions that each instance of the class may call.

Declaring a member function is done with `member function declare start`. It takes in the function's privacy (as `public`,`protected`, or`private`), name in PascalCase, return type, and any number of (name, type) pairs of parameters.

```
class start : Announcer
    member variable declare : private Greeting string

    member function declare start : public Greet void name string
        print : { concatenate : { member variable : private { this } Greeting } (", ") name "!" }
    member function declare end

    constructor start : public Announcer greeting string
        operation : { member variable : private { this } Greeting } equals greeting
    constructor end
class end
```

In C#:

```csharp
using System;

class Announcer
{
    private string greeting;

    public void Greet(string name)
    {
        Console.WriteLine(this.greeting + ", " + name + "!");
    }

    Announcer(string greeting)
    {
        this.greeting = greeting;
    }
}
```

In Python:

```python
class Announcer:
    def greet(self, name):
        print(self.__greeting + ", + " + name + "!")

    def __init__(self, string):
        self.__greeting = greeting
```

## Calling

Call member functions with the `member function` command. It takes in the same function privacy, , caller's name, and any number of parameters.

```
member function : public announcer Greet ("Sample")
```

* In C#: `announcer.Greet("Sample");`
* In Python: `announcer.greet("sample")`


# Interfaces

Most languages either lack type annotations or recognize some kind of "interface" descriptor of types. As with member variable declarations, declaring an interface is allowed in Budgie and only creates code in strongly or gradually typed languages.

`interface start` takes in a PascalCase name of an interface followed by any number of interfaces to extend from. End an interface with `interface end`.

Declare public methods on an interface with `interface method`, which takes the name of the method in PascalCase, the return type, followed by any number of (name, type) parameters.

```
interface start : IShape
    interface method : GetArea double
interface end

interface start : IPolygon IShape
    interface method : GetPerimeter double
interface end
```

In C#:

```csharp
interface IShape
{
    double GetArea();
}

interface IPolygon : IShape
{
    double GetPerimeter();
}
```

## Exports

You can export interfaces from the current file by including the `export` keyword before the interface's name.

```
interface start : export IShape
    interface method : GetArea double
interface end
```

In C#:

```csharp
public interface IShape
{
    double GetArea();
}
```


# Static Variables

Budgie syntax for static variables behaves almost identically to the member equivalents. Accessing them takes in the class name instead of an instance reference.

Additionally, static members may declare an initial value as a final parameter.

```
class start : AnglePrinter
    static variable declare : private rightAlias string "right"
    static variable declare : private rightAmount int 90

    member function declare start : public PrintAngle string angle int
        if start : { operation : angle (equal to) { static variable : private AnglePrinter rightAmount } }
            return : { static variable : private AnglePrinter rightAlias }
        if end

        return : { string format : ("{0} degrees") angle int }
    member function declare end
class end
```

In C#:

```csharp
class AnglePrinter
{
    private static string rightAlias = "right";
    private static int rightAmount = 90;

    public string PrintAngle(int angle)
    {
        if (angle == AnglePrinter.rightAmount)
        {
            return AnglePrinter.rightAlias;
        }

        return string.Format("{0} degrees", angle);
    }
}
```

In Python:

```python
class AnglePrinter:
    __right_alias = "right"
    __right_amount = 90

    def print_angle(self, angle):
        if angle == AnglePrinter.__right_amount:
            return AnglePrinter.__right_alias

        return "{0} degrees".format(angle)
```


# Static Functions

As with static variables, Budgie syntax for static functions behaves almost identically to the member equivalents. The only difference is that accessing them takes in the class name instead of an instance reference.

```
class start : Utilities
    static function declare start : public GetLongest string words { array type : string }
        variable : longest string

        for each start : words word string
            if start : { operation : { string length : word } (greater than) { string length : longest } }
                operation : longest equals word
            if end
        for each end

        static function : public Utilities log word

        return : longest
    static function declare end

    static function declare start : public log void word string
        print : { concatenate : ("Logging: ") word }
    static function declare end
class end
```

In C#:

```csharp
using System;

class Utilities
{
    public static string GetLongest(string[] words)
    {
        string longest;

        foreach (string word in words)
        {
            if (word.Length > longest.Length)
            {
                longest = word;
            }
        }

        Utilities.Log(word);

        return longest;
    }

    public static void Log(string word)
    {
        Console.WriteLine("Logging: " + word);
    }
}
```

In Python:

```python
class Utilities:
    @staticmethod
    def get_longest(words):
        for word in words:
            if len(word) > len(longest):
                longest = word

        Utilities.log(word)

        return longest

    @staticmethod
    def log(word):
        print("Logging: " + word)
```


# Standalone Functions

It's common to use functions or methods that have no logical connection as members of classes. Dynamic languages with first-class functions such as JavaScript and Python typically declare these as standalone functions declare stored as regular variables. Static languages with class-based files such as C# and Java typically declare these as static methods within static classes.

## Declaring Standalone Functions

Budgie unifies the two with the concept of a `standalone function`. These functions, similar to static functions, are referenced in Budgie code as members of some standalone container, which becomes a static class in static languages but goes away in dynamic languages.

Declaring a standalone function requires placing it within a group of them, similar to a static class declaration.

* `standalone functions declare start` takes a single parameter as the name of the group in PascalCase, which will become the class name in static languages.

  It may take in the `export` keyword before the name of the group to indicate the group being available to import in other files.
* `standalone functions declare end` closes the group and takes no parameters.
* `standalone function declare start` takes in either `public` or `private` to indicate its availability outside of the group, the function name in PascalCase, return type, and any number of (name, type) pairs of parameters.
* `standalone function declare end` closes a function and takes no parameters.

Calling standalone functions with `standalone function` takes in the name of the group in PascalCase, the privacy of the command, the name of the method in PascalCase, then any parameters.

```
standalone functions declare start : export TextUtilities
    standalone function declare start : public SquareText string text string
        return : { standalone function : private TextUtilities RepeatText text { string length : text } }
    standalone function declare end

    standalone function declare start : private RepeatText string text string times int
        variable : combined string ""

        for numbers start : i int 0 times
            operation : combined (increase by) text
        for numbers end

        return : combined
    standalone function declare end
standalone functions declare end
```

In C#:

```csharp
public static class TextUtilities
{
    public static string SquareText(string text)
    {
        return TextUtilities.RepeatText(text, text.Length);
    }

    private static string RepeatText(string text, int times)
    {
        string combined = "";

        for (int i = 0; i < times; i++)
        {
            combined += text;
        }

        return combined;
    }
}
```

In Python:

```python
def square_text(text):
    return repeat_text(text, len(text))

def repeat_text(text, times):
    combined = ""

    for (i in range(0, times)):
        combined += text

    return combined
```

## Importing Standalone Functions

The `import standalone functions` command must be used after the `use` in import declarations. Different languages will import either the container group (static class) or individual functions. It takes in the name of the group in PascalCase followed by any number of standalone function names in PascalCase to import.

```
import local : Utilities Text use { import standalone functions : TextUtilities RepeatText }

variable : repeated string { standalone function : public TextUtilities RepeatText "foo" 7 }
```

In C#:

```csharp
using Utilities.Text;

string repeated = TextUtilities.RepeatText("foo", 7);
```

In Python:

```python
from "./utilities/text" import repeat_text

repeated = repeat_text("foo", 7)
```


# Main

All languages provide some way to execute code immediately.

Scripting languages such as Python and Ruby will execute all code in order immediately, whereas class-based languages such as C# and Java require a class wrapping a static method akin to C/C++'s "main" function.

Budgie resolves the differences by declaring an area as a "main context" with `main context start` and `main context end`. A main function may be declared within that context with `main start` and `main end`.

```
main context start
    main start
        print : ("Hello world!")
    main end
main context end
```

In C#:

```csharp
using System;

class Program
{
    public static void Main()
    {
        Console.WriteLine("Hello world!");
    }
}
```

In Python:

```python
if __name__ == "__main__":
    print("Hello world!")
```

## Functions

Main contexts, other than the way they're declared, are functionally identically to standalone function groups. That means you can still declare standalone functions within them.

```
main context start
    standalone function declare start : private SayHello void name string
        print : { concatenate : ("Hello, ") name "!" }
    standalone function declare end

    main start
        standalone function : private { main group } SayHello "Budgie"
    main end
main context end
```

In C#:

```csharp
using System;

class Program
{
    private void SayHello(string name)
    {
        Console.WriteLine("Hello, " + name + "!");
    }

    public static void Main()
    {
        SayHello("Budgie");
    }
}
```

In Python:

```python
def say_hello(name):
    print("Hello, " + name + "!")

if __name__ == "__main__":
    say_hello("Budgie")
```

> Function names must be given in PascalCase so that Budgie can transform them into the appropriate case for the output language. JavaScript, for example, prefers camelCase, while Python prefers snake\_case.


# Lambdas

Lambdas, or anonymous functions, are small functions created inside of another function. They have access to variables inside and parameters passed to that function. Budgie allows one-line lambdas to be passed in place of variables to other functions.

## Lambda Types

To accept a lambda as a parameter, use the `lambda type inline` command to declare its type. It takes in the lambda's return type and zero to two (parameterName, parameterType) pairs.

You can then use the `lambda` command to call that lambda, which takes in the name of the lambda and any parameters to pass to it.

```
standalone function declare start : private RunOnInts void format { lambda type inline : string i int }
    for numbers start : i int 0 10
        print : { lambda : format i }
    for numbers end
standalone function declare end
```

C#:

```csharp
private void RunOnInts(Func<int, void> format)
{
    for (int i = 0; i < 10; i += 1)
    {
        Console.WriteLine(format(i));
    }
}
```

Python:

```python
def run_on_ints(format):
    for i in range(0, 10):
        print(format(i))
```

## Lambda Declarations

New lambdas can be declared as parameters to called functions or other lambdas. Declare them with `lambda declare`, which takes in the return type of the lambda, zero to two (parameterName, parameterType) pairs, and the (single line) body of the lambda.

```
standalone function : private { main group } RunOnInts { lambda declare : string i int { string format : ("Int: {0}") i int } }
```

C#:

```csharp
Program.RunOnInts((int i) => string.Format("Int: {0}", i));
```

Python:

```python
run_on_ints((i) => print("Int: {0}".format(i)))
```


# Exceptions

All languages have some way of representing a breaking error state, or exception, that indicates control flow must be halted. Exceptions may be created and thrown, also known as raised, and later caught, also known as rescued, by some calling code. Budgie refers to these operations as catching and throwing exceptions.

## Throwing

The built-in exception class for an output language is represented in Budgie by the `exception` command, which receives a single string as input. It can be thrown with the `throw` command.

```
throw : { exception } ("Oh no!")
```

In C#:

```csharp
throw new Exception("Oh no!");
```

In Python:

```python
raise Exception("Oh no!")
```

## Catching

All supported languages have some variant of the following three code blocks:

* Try: runs some code that might throw an error
* Catch: handles any error thrown by the try section
* Finally: runs regardless of whether an error was thrown

Each of these are considered their own distinct blocks with a `start` and `end` in Budgie. The `catch` section also takes in the name of a general exception.

```
try start
    throw : { exception } ("Oh no!")
try end
catch start : error
    print : ("Found an error.")
catch end
finally start
    comment line : ...
finally end
```

In C#:

```csharp
try
{
    throw new Exception("Oh no!");
}
catch (Exception error)
{
    Console.WriteLine("Found an error.");
}
finally
{
    // ...
}
```

In Python:

```python
try:
    raise Exception("Oh no!")
except Exception as error:
    print("Found an error.")
finally:
    # ...
```


# Files

All the samples thus far have been isolated snippets of code. Some languages, particularly class-based ones, will have some scaffolding at the beginning and end of files. These lines are often dependent upon both the file name and/or path within a project.

The first line of every `.bg` file should be a `file start`, which takes any number of PascalCase folder names representing the file's path in its project, followed by the PascalCase file name.

The last line of every `.bg` file should be a `file end`.

```
file start : Models Speech Word
    class start : Word
        comment line : ...
    class end
file end
```

In C#:

```csharp
namespace Models.Speech
{
    class Word
    {
        // ...
    }
}
```

In Python:

```python
class Word:
    # ...
```

Note that because of [Java](https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.6), each file must export a construct with the same file's name. You can use any of:

* `class start : export` to export a [class](/syntax/classes)
* `enum start : export` to export an [enum](/syntax/enums)
* `interface start : export` to export an [interface](https://github.com/budgielang/budgie/tree/efcab6c84224e6e5b13b971784c6fa3bd61d44ed/docs/syntax/interfaces.md)
* `standalone functions declare start : export` to export a [standalone function group](/syntax/standalone-functions)


# Imports

Supported languages generally have one or two of the following forms of imports:

1. Importing specific items within a package
2. Importing an entire package

We define a package here as either an external package or a local ("relative") file within the same project. So far, only importing specific items from relative files is supported.

## Relative Imports

You can import specific constructs from other files using `import local`. It takes in three sections:

* Absolute directory path from the project root to file to import from, including the file's name
* Optionally, the `use` keyword followed by any runtime constructs (such as classes) to retrieve from the file
* Optionally, the `types` keyword followed by any interfaces to retrieve from the file

Languages that do not recognize interfaces, such as JavaScript, will ignore any `types` imports.

```
file start : MyProject Samples Sample
    import local : MyProject Actors Actor use Actor
    import local : MyProject Collections Storage use Storage types IStorage
    import local : MyProject Definitions ActorDefinitions IAction types IAction
file end
```

In C#:

```csharp
using MyProject.Actors;
using MyProject.Collections;
using MyProject.Definitions.ActorDefinitions;

namespace MyProject.Samples
{
}
```

In Python:

```python
from ..actors.actor import Actor
from ..collections.storage import Storage
```

### Standalone Imports

[Standalone functions](/syntax/standalone-functions) may become either a single class or collection of functions depending on the output language, so they must imported using a specialized `import standalone functions` command within an `import local` command's `use` section. It takes in the group name to import from and any number of items from the group.

```
file start : MyProject Samples Sample
    import local : MyProject Utilities Strings use { import standalone functions : Strings IsPalindrome Repeat }
file end
```

In C#:

```csharp
using MyProject.Utilities;

namespace MyProject.Samples
{
}
```

In Python:

```python
from ...utilities.strings import is_palindrome repeat
```

## Absolute Imports

These are not supported yet.

### Built-In Imports

You may have seen in previous examples that some languages prepend imports before their code. C#, for example, has `using System;` before any instance of `Console.WriteLine`. Budgie will keep track of system imports required for each native command.


# Unsupported Commands


# Projects


# Internals

The driving class to convert Budgie syntax into real language code is `Budgie`. Its internal conversion process consists of three steps:

1. **Tokenization**
2. **Rendering**
3. **Merging**

## 1. Tokenization

Given raw syntax as string(s), it must be "tokenized" (parsed) into Budgie nodes. Budgie nodes come in three varieties, each of which implement the exported `IBudgieNode` interface:

* `BlankNode`: Blank line with no non-whitespace characters.
* `CommandNode`: Command name followed by any number of arguments.
* `TextNode`: Raw text passed to a command.

For example, given the following line:

```
variable : foo number { operation : 1 plus 2 }
```

The corresponding Budgie file's node structure in JSON would look like:

```javascript
{
    "nodes": [
        {
            "args": [
                "foo",
                "number",
                {
                    "args": [
                        "1",
                        "plus",
                        "2"
                    ],
                    "command": "operation",
                    "type": "Command"
                }
            ],
            "command": "variable",
            "type": "Command"
        }
    ]
}
```

### `SourceFileParser`

Parsing raw Budgie strings is done by `SourceFileParser`, which uses a `SourceLineParser` to convert each line of the input file. You can directly create a `BudgieFile` containing `IBudgieNode`s using one without a driving `Budgie` context:

```javascript
import { SourceFileParser } from "budgielang";

const parser = new SourceFileParser();

parser.parseLines([
    `print: ("Hello world!")`
]);
```

## 2. Rendering

Given a `BudgieFile`, each "line" (root-level node) is converted to an intermediate `LineResults` instance. The `LineResults` class contains an array of `CommandResult` instances, which store the generated language-specific code and desired indentation, and whether the line should have a semicolon.

> Semicolons and indentation levels are separate from the `CommandResult` text because nested commands need to ignore them. For example, `operation : b (increase by) c` creates a semicolon and is indented normally on its own, but not inside `list push : a { operation : b (increase by) c }`.

### `RenderContext`

Rendering is managed by a `RenderContext` instance containing a plethora of public methods. It has references to the output `Language`, `Command` classes that can render nodes to the language, and current directory path of the parsed file. The `RenderContext` instance is exposed to each `Command` for recursion.

The most notable method is also `convert`, and is directly called by the parent `Budgie`. This `convert` takes in a `BudgieFile` and returns an array of `LineResults`.

```javascript
import { CSharp, RenderContext, SourceFileParser } from "budgielang";

const parser = new SourceFileParser();
const context = new RenderContext(new CSharp());

const BudgieFile = parser.parseLines([
    `print: ("Hello world!")`
]);

// System.Console.WriteLine("Hello world!");
context.convert(BudgieFile);
```

The recursive step to convert `IBudgieNode`s into `LineResults` is done by an internal `BudgieNodeRenderer`.

### `Command`

Each available Budgie command is keyed to a `Command` sub-class by name. They're retrieved by name by the `BudgieNodeRenderer` using a `CommandsBag`. Raw Budgie describes the commands in `lower case`; `Command` sub-classes have the corresponding name in `PascalCase`. For example, `list push` corresponds to `ListPushCommand` in `src/Rendering/Commands/ListPushCommand.ts`.

Commands render `LineResults` through their `render` function.

#### `CommandMetadata`

Each `Command` stores a `CommandMetadata` member with some basic information on the command, such as its name and description. The metadata also includes the expected parameters the command takes in as an. `IParameter` array. These are validated by the `BudgieNodeRenderer` against what the command is passed before commands are rendered.

## 3. Merging

Once a file's `LineResults` are collected into an array, they're conglomerated into a `string[]` of output language lines.

This boils down to an advanced string concatenation: each result of each `LineResult` is added to the overall `output`, factoring in indentation.


# Languages

There are six "tiers" of langauges recognized by Budgie:

1. [Unknown](/languages#unknown)
2. [Unsupported](/languages#unsupported)
3. [Best Guess](https://docs.budgielang.org/pages/-Ls5JvhO_7SLXfNpRNi4#best%20guess)
4. [Output Only](https://docs.budgielang.org/pages/-Ls5JvhO_7SLXfNpRNi4#output%20only)
5. [Partial Input](https://docs.budgielang.org/pages/-Ls5JvhO_7SLXfNpRNi4#partial%20input)
6. [Full](/languages#full)

## Unknown

These languages each need to be investigated and assigned a higher tier.

| Language     | Issue                                                   |
| ------------ | ------------------------------------------------------- |
| D            | [#361](https://github.com/budgielang/budgie/issues/361) |
| emojicode    | [#429](https://github.com/budgielang/budgie/issues/429) |
| Groovy       | [#454](https://github.com/budgielang/budgie/issues/454) |
| Haxe         | [#247](https://github.com/budgielang/budgie/issues/247) |
| Kotlin       | [#453](https://github.com/budgielang/budgie/issues/453) |
| LLVM         | [#381](https://github.com/budgielang/budgie/issues/381) |
| LOLCODE      | [#267](https://github.com/budgielang/budgie/issues/267) |
| Objective C  | [#191](https://github.com/budgielang/budgie/issues/191) |
| Powershell   | [#103](https://github.com/budgielang/budgie/issues/103) |
| sh           | [#436](https://github.com/budgielang/budgie/issues/436) |
| Swift        | [#105](https://github.com/budgielang/budgie/issues/105) |
| Visual Basic | [#439](https://github.com/budgielang/budgie/issues/439) |

## Unsupported

Some languages will never be able to be accurately compiled to by Budgie because of severe structural abnormalities in the language's design. They are so different from the norm that any attempt to output them from Budgie would be horrendously overcomplicated and inaccurate.

These languages will never be output by Budgie for the following major reasons *(among others)*:

| Language | Unusual Arrays                                       | Unusual Classes | Unusual Returns |
| -------- | ---------------------------------------------------- | --------------- | --------------- |
| C        |                                                      | ✓               |                 |
| Go       |                                                      | ✓               |                 |
| Matlab   |                                                      |                 | ✓               |
| PHP      | [✓](https://github.com/budgielang/budgie/issues/102) |                 |                 |

## Best Guess

Some languages will never be able to be accurately compiled to by Budgie, but the compiler can roughly come close.

These languages will never be guaranteed accurate Budgie output for the following common reasons *(among others)*:

| Language | Manual Pointers |
| -------- | --------------- |
| C++      | ✓               |

### Why Try?

There are still some cases where it may be useful to have near-working output in an unsupported language. For example, when using Budgie for snippets of code as sample answer guidelines to coding interview questions, it's not necessary for the result to be provably correct.

> Again: Budgie gives no guarantee of code working in these languages. They will almost certainly fail at more than a few lines.

## Output Only

| Language   |
| ---------- |
| JavaScript |
| Ruby       |
| Python     |

These languages can be fully output by Budgie but don't provide rich enough type information in their syntax to be statically converted to Budgie.

## Partial Input

| Language   | Compiler                                             | `int` vs `double` |
| ---------- | ---------------------------------------------------- | ----------------- |
| TypeScript | [TS-Budgie](https://github.com/budgielang/TS-Budgie) | *Missing*         |

These languages may be generally compiled from their native source code to Budgie with a "best guess" approximation of the equivalent Budgie code. They must have some kind of gradual or even static typing, but are not required to fully support differences between all Budgie types.

## Full

| Language | Compiler                                             |
| -------- | ---------------------------------------------------- |
| C#       | [CS-Budgie](https://github.com/budgielang/CS-Budgie) |
| Java     | *(not started)*                                      |

These languages are capable of being compiled from their native source code to Budgie and then back out to any supported language.

In order for a language to be fully supported, it must:

* Completely support static typings via a programmable AST.
* Recognize differences between all Budgie types, including:
  * `char` vs. `string`
  * `int` vs. `double`


# Omissions

Budgie intentionally targets a "lowest common denominator" of features for common OOP languages.

## Intentionally Missing Features

If any target language doesn't reasonably support a feature, Budgie cannot support that feature.

| Feature                                | C#        | Java       | JavaScript | Python    | Ruby      | TypeScript |
| -------------------------------------- | --------- | ---------- | ---------- | --------- | --------- | ---------- |
| async/await                            |           | *Missing*  |            |           | *Missing* |            |
| Default Member Variable Values         |           |            |            |           | *Missing* |            |
| Do/While Loops                         |           |            |            | *Missing* |           |            |
| Enum Values as Numbers                 |           | *Abnormal* |            |           |           |            |
| Enum Values as Strings                 | *Missing* |            |            |           |           |            |
| Enums Without Values                   |           |            |            | *Missing* |           |            |
| Inline Lambda Types with >2 Parameters |           | *Missing*  |            |           |           |            |
| Multiline Lambdas                      |           |            |            | *Missing* |           |            |
| Optional Parameters                    |           | *Missing*  |            |           |           |            |
| Sort Comparators                       |           |            |            | *Missing* |           |            |
| Switch Statements                      |           |            |            | *Missing* |           |            |


