Skip to content
Ammy language repository
C# Nemerle HTML Batchfile PowerShell CSS
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.nuget updated NuGet.exe Feb 1, 2018
docs initial commit Apr 24, 2017
lib preliminary c# 6/7 support Jun 14, 2017
src option to transform ammy -> xaml on save in the settings window Feb 12, 2018
test recreate _regionList on each update Sep 4, 2017
.gitignore initial commit Apr 24, 2017
.gitmodules removed Nitra submodule May 17, 2017
Ammy.Samples.sln initial commit Apr 24, 2017
Ammy.Tests.sln fixed UWP (Xamarin Forms) crash on startup Aug 15, 2017
LICENCE initial commit Apr 24, 2017 Update Apr 25, 2017
build-all.cmd initial commit Apr 24, 2017
build-ammy.cmd initial commit Apr 24, 2017
build-nuget-host.cmd initial commit Apr 24, 2017
build-nuget.cmd initial commit Apr 24, 2017 fixed UWP (Xamarin Forms) crash on startup Aug 15, 2017
run-tests.cmd initial commit Apr 24, 2017
run-unittests.cmd initial commit Apr 24, 2017
upload-myget.cmd initial commit Apr 24, 2017
upload-nuget.cmd initial commit Apr 24, 2017

Ammy - UI Language for XAML platforms

Ammy is a modern UI language that either replaces or compliments XAML in your projects.

Project site


Gitter chat


Main features of Ammy

  • Very simple JSON-like syntax
  • Mixins and aliases to fight copy-pasting and to keep code DRY
  • Inline Binding Converters to avoid implementing IValueConverters for every simple task
  • Runtime Update that actually works (VS2017 has very limited update functionality at the moment)

How Ammy code looks

Window "MyApp.MainWindow" {
  Title: "My first Application"

  Grid {
    TextBlock { "Hello, World!" }

Note that you don't need to import any namespaces manually. In case you need to import external namespace, there is C# a using keyword available.

Slightly more complicated example

alias FormField (labelText, binding)
  StackPanel {
    Orientation: Horizontal
    TextBlock { Text: $labelText }
    TextBlock {
      Text: $binding

Window "MyApp.MainWindow" {
  Title: "My First App"
  StackPanel { 
    @FormField ("First name", bind FirstName)
    @FormField ("Last name", bind LastName)
    TextBlock {
      Text: bind 
            convert (MyViewModel vm) => "Hello, " + vm.FirstName + " " + vm.LastName

Building and debugging

  • Install Visual Studio 2017 if you don't have one
  • Install Nemerle (Click "Download Now" button)
  • Clone repository
  • Open Ammy.sln solution in VS2017 and build it
  • Set Ammy.VisualStudio project as StartUp Project and start Debugging session
  • Open Ammy.Tests.sln solution
  • Ammy.Test.Workbench project is for debugging
  • Ammy.Test.Wpf contains permanent tests that should all compile

Project structure

Syntax and AST

Ammy uses Nitra for parsing and typing. First, file is parsed with syntax defined in Syntax.nitra. Resulting ParseTree is then mapped to AST (Mapping.nitra, MappingExpr.nitra, MappingFunctions.nitra).

Semantic analysis is a process where types loaded from Backend are binded to AST. This process defined inside Ast and AstBase projects in .nitra files.

  • Ammy.Backend (Loads referenced assemblies and creates Nitra symbols)
  • Ammy.AstBase (Common AST types)
  • Ammy.Ast (More AST types)
  • Ammy.Syntax (Syntax and Mapping to AST)


Sidekick library has two primary functions. 1) ExpressionConverter used for inline binding converters 2) Runtime update logic

  • Ammy.Sidekick.XamarinForms
  • Ammy.Sidekick.Uwp
  • Ammy.Sidekick.Common

Compilation and Tasks

Build assembly is a glue between IDE/MSBuild and Ammy language.

  • Ammy.Build
  • Ammy.BamlCompilerWPF


  • Ammy.VisualStudio
  • Ammy.VisualStudio.Service
  • Ammy.VisualStudio.ItemTemplates

Ammy.VisualStudio only contains service providers. These providers use RuntimeLoader to load Ammy.VisualStudio.Service assembly and load actual services. Ammy.VisualStudio.Service contains all the logic for highlighting, intelli-sense, regions, adornments, classisifiers and other stuff.

You can’t perform that action at this time.