• Modules
    • By category
    • By name
    • Most popular
    • Most downloaded
    • Repository
  • Register
  • Log in
  • Help
    • Start using Ceylon Herd
    • Publish your first module
    • Module publishing guidelines
    • All about Ceylon
    • Keyboard Shortcuts

    • s Focus search module bar
      ? Open this information panel
      j Move selection down
      k Move selection up
      enter Open current selection
Module info
Name
lucaswerkmeister / ceylon.ast.create / 1.3.0
Utililty functions to create ceylon.ast nodes easily
Backends JVM JavaScript
Maven coordinates
Compatible Ceylon release JVM: 1.2.x, 1.3.x (latest)
JavaScript: 1.2.1, 1.2.2, 1.3.x (latest)
Published Sep 18, 2016
Stats Downloads (JVM): 291
Downloads (JS): 76
Source downloads: 238
Description

This module contains helper functions to simplify creating [[ceylon.ast|module ceylon.ast.core]] [[nodes|ceylon.ast.core::Node]].

The most useful functions are baseExpression and baseType, which allow you to abbreviate

BaseExpression(MemberNameWithTypeArguments(LIdentifier("null")))
BaseType(TypeNameWithTypeArguments(UIdentifier("String")))

as

baseExpression("null")
baseType("String")

Many of the functions in this package are also designed to be used with named arguments, where the “listed” argument (comma-separated) is assigned to the first unassigned iterable parameter. For example, we intend you to write

annotations {
    documentation = "Documentation.";
    "shared", "actual", "default"
}

and not

annotations {
    documentation = "Documentation.";
    annotations = { "shared", "actual", "default" };
}

This is especially important for the functionDefinition, classDefinition and interfaceDefinition functions.

Dependencies
ceylon.ast.core/1.3.0 shared
ceylon.collection/1.3.0
ceylon.language/1.3.0
Usage
  • Import
 import ceylon.ast.create "1.3.0";
Module links Members
Imported By
Home
Code repository
Issue tracker
Browse
Download .car
Download .js
Download source archive
Download module documentation
View API documentation

Ceylon Herd v1.24 Copyright 2012-2023 Red Hat. About